C# 클래스 Monobjc.ObjectiveCEncoding

Utility class to handle encoding of types and methods.

파일 보기 프로젝트 열기: Monobjc/monobjc

공개 메소드들

메소드 설명
GetSelector ( MethodBase methodBase ) : String

Gets the selector for the given method.

The selector for a method is build with the following rules: Selector begins with the method name The first parameter if present is appended by its name with the "With" prefix The other parameters if present are appended by their names

Here are some examples of result: Method Corresponding selector public void DoThis() DoThis public void DoThis(int value) DoThisWithValue: public void DoThis(NSString str, int val) DoThisWithStr:val:

GetSignature ( MethodInfo methodInfo ) : String

Gets the signature for the given method.

Here are some examples of result for methods: Method Corresponding signature (on IA32 architecture) public void DoThis() v8@0:4 public void DoThis(int value) v12@0:4i8 public void DoThis(NSString str, int val) v16@0:4@8i12

GetTypeAlignment ( Type type ) : int

Return the native type alignment size used to build selector signature. The value represents the size of the parameter on the stack.

Here are some examples of sizes: Type Corresponding size (on IA32 architecture) bool or Boolean 1 int or Int32 4 NSString 4 NSRect 16

GetTypeEncoding ( Type type ) : String

Return the Objective-C encoding used to build selector signature.

Here are some examples of encoding: Type Corresponding encoding void v int or Int32 i NSString @ int[] ^i NSRect {NSRect={NSPoint=ff}{NSSize=ff}}

For a full list of the encoding, refer to http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_5_section_7.html

GetTypeSize ( Type type ) : int

Return the native type size. The value represents the natural size of the type.

Here are some examples of sizes: Type Corresponding size (on IA32 architecture) bool or Boolean 1 int or Int32 4 NSString 4 NSRect 16

비공개 메소드들

메소드 설명
GetSignature ( MethodInfo methodInfo, int parametersToSkip ) : String

Gets the signature for the given method.

GetTypeAlignmentInternal ( IntPtr type ) : int
GetTypeEncodingInternal ( IntPtr type ) : String
GetTypeSizeInternal ( IntPtr type ) : int

메소드 상세

GetSelector() 공개 정적인 메소드

Gets the selector for the given method.

The selector for a method is build with the following rules: Selector begins with the method name The first parameter if present is appended by its name with the "With" prefix The other parameters if present are appended by their names

Here are some examples of result: Method Corresponding selector public void DoThis() DoThis public void DoThis(int value) DoThisWithValue: public void DoThis(NSString str, int val) DoThisWithStr:val:

public static GetSelector ( MethodBase methodBase ) : String
methodBase System.Reflection.MethodBase The method.
리턴 String

GetSignature() 공개 정적인 메소드

Gets the signature for the given method.

Here are some examples of result for methods: Method Corresponding signature (on IA32 architecture) public void DoThis() v8@0:4 public void DoThis(int value) v12@0:4i8 public void DoThis(NSString str, int val) v16@0:4@8i12

If the method is null.
public static GetSignature ( MethodInfo methodInfo ) : String
methodInfo System.Reflection.MethodInfo The method.
리턴 String

GetTypeAlignment() 공개 정적인 메소드

Return the native type alignment size used to build selector signature. The value represents the size of the parameter on the stack.

Here are some examples of sizes: Type Corresponding size (on IA32 architecture) bool or Boolean 1 int or Int32 4 NSString 4 NSRect 16

public static GetTypeAlignment ( Type type ) : int
type System.Type The type to measure.
리턴 int

GetTypeEncoding() 공개 정적인 메소드

Return the Objective-C encoding used to build selector signature.

Here are some examples of encoding: Type Corresponding encoding void v int or Int32 i NSString @ int[] ^i NSRect {NSRect={NSPoint=ff}{NSSize=ff}}

For a full list of the encoding, refer to http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_5_section_7.html

public static GetTypeEncoding ( Type type ) : String
type System.Type The type to encode.
리턴 String

GetTypeSize() 공개 정적인 메소드

Return the native type size. The value represents the natural size of the type.

Here are some examples of sizes: Type Corresponding size (on IA32 architecture) bool or Boolean 1 int or Int32 4 NSString 4 NSRect 16

public static GetTypeSize ( Type type ) : int
type System.Type The type to measure.
리턴 int