public CILProperty ChangeDeclaringType(params CILTypeBase[] args) { LogicalUtils.ThrowIfDeclaringTypeNotGeneric(this, args); CILProperty propToGive = this; CILType dt = this.declaringType.Value; if (dt.GenericDefinition != null) { propToGive = dt.GenericDefinition.DeclaredProperties[dt.DeclaredProperties.IndexOf(this)]; } return(this.context.Cache.MakePropertyWithGenericType(propToGive, args)); }
/// <summary> /// Gets the count of the index parameters of the property. /// </summary> /// <param name="property">The property.</param> /// <exception cref="ArgumentNullException">If <paramref name="property"/> is <c>null</c>.</exception> /// <returns>The amount of index parameters of the property.</returns> public static Int32 GetIndexTypeCount(this CILProperty property) { ArgumentValidator.ValidateNotNull("Property", property); var getter = property.GetMethod; Int32 result; if (getter == null) { var setter = property.SetMethod; result = setter == null ? 0 : (setter.Parameters.Count - 1); } else { result = getter.Parameters.Count; } return(result); }
/// <summary> /// Gets any index parameters the property has. /// </summary> /// <param name="property">The property.</param> /// <returns>The index parameters of the <paramref name="property"/>.</returns> /// <exception cref="ArgumentNullException">If <paramref name="property"/> is <c>null</c>.</exception> /// <seealso cref="System.Reflection.PropertyInfo.GetIndexParameters()"/> public static IEnumerable <CILParameter> GetIndexParameters(this CILProperty property) { ArgumentValidator.ValidateNotNull("Property", property); var getter = property.GetMethod; IEnumerable <CILParameter> result; if (getter == null) { var setter = property.SetMethod; result = setter == null ? EMPTY_PARAMS : setter.Parameters.Take(property.SetMethod.Parameters.Count - 1); } else { result = getter.Parameters; } return(result); }
/// <summary> /// Gets the type of the property. /// </summary> /// <param name="property">The property.</param> /// <returns>The type of the <paramref name="property"/>.</returns> /// <exception cref="ArgumentNullException">If <paramref name="property"/> is <c>null</c>.</exception> /// <exception cref="InvalidOperationException">Both <c>get</c> and <c>set</c> accessor methods of the <paramref name="property"/> are <c>null</c>.</exception> /// <seealso cref="System.Reflection.PropertyInfo.PropertyType"/> public static CILTypeBase GetPropertyType(this CILProperty property) { ArgumentValidator.ValidateNotNull("Property", property); CILTypeBase result; var getter = property.GetMethod; if (getter == null) { var setter = property.SetMethod; if (setter == null) { throw new InvalidOperationException("Given property has no getter nor setter."); } result = setter.Parameters.Last().ParameterType; } else { result = getter.ReturnParameter.ParameterType; } return(result); }
protected AbstractCompositeModelTypeCodeGenerator(Boolean isSilverlight, CILReflectionContext aCtx) { this.isSilverLight = isSilverlight; this.ctx = aCtx; this.COMPOSITE_CTOR_PROPERTIES_PARAM_TYPE = COMPOSITE_CTOR_PROPERTIES_PARAM_TYPE_NATIVE.NewWrapperAsType(ctx); this.COMPOSITE_CTOR_EVENTS_PARAM_TYPE = COMPOSITE_CTOR_EVENTS_PARAM_TYPE_NATIVE.NewWrapperAsType(ctx); this.ACTION_REF_TYPE = ACTION_REF_TYPE_NATIVE.NewWrapperAsType(ctx); this.ACTION_REF_TYPES_1 = ACTION_REF_TYPES_1_NATIVE.Select(t => t.NewWrapperAsType(ctx)).ToArray(); this.ACTION_REF_TYPES_2 = ACTION_REF_TYPES_2_NATIVE.Select(t => t.NewWrapperAsType(ctx)).ToArray(); this.CHECK_STATE_FUNC_TYPE = CHECK_STATE_FUNC_TYPE_NATIVE.NewWrapperAsType(ctx); this.PUBLIC_COMPOSITE_CTOR_ADDITTIONAL_PARAM_TYPES = PUBLIC_COMPOSITE_CTOR_ADDITTIONAL_PARAM_TYPES_NATIVE.Select(t => t.NewWrapperAsType(ctx)).ToArray(); this.ACTION_TYPE = ACTION_TYPE_NATIVE.NewWrapperAsType(ctx); this.FRAGMENT_DEPENDANT_TYPE = FRAGMENT_DEPENDANT_TYPE_NATIVE.NewWrapperAsType(ctx); this.FIELD_MODEL_TYPE = FIELD_MODEL_TYPE_NATIVE.NewWrapperAsType(ctx); this.CONSTRUCTOR_MODEL_TYPE = CONSTRUCTOR_MODEL_TYPE_NATIVE.NewWrapperAsType(ctx); this.PARAMETER_MODEL_TYPE = PARAMETER_MODEL_TYPE_NATIVE.NewWrapperAsType(ctx); this.SPECIAL_METHOD_MODEL_TYPE = SPECIAL_METHOD_MODEL_TYPE_NATIVE.NewWrapperAsType(ctx); this.COMPOSITE_METHOD_MODEL_TYPE = COMPOSITE_METHOD_MODEL_TYPE_NATIVE.NewWrapperAsType(ctx); this.CONSTRAINT_MODEL_TYPE = CONSTRAINT_MODEL_TYPE_NATIVE.NewWrapperAsType(ctx); this.VOID_TYPE = VOID_TYPE_NATIVE.NewWrapperAsType(ctx); this.OBJECT_TYPE = OBJECT_TYPE_NATIVE.NewWrapperAsType(ctx); this.ATTRIBUTE_TYPE = ATTRIBUTE_TYPE_NATIVE.NewWrapperAsType(ctx); this.TYPE_TYPE = TYPE_TYPE_NATIVE.NewWrapperAsType(ctx); this.ABSTRACT_INJECTABLE_MODEL_TYPE = ABSTRACT_INJECTABLE_MODEL_TYPE_NATIVE.NewWrapperAsType(ctx); this.CONSTRAINT_TYPE = CONSTRAINT_TYPE_NATIVE.NewWrapperAsType(ctx); this.INT32_TYPE = INT32_TYPE_NATIVE.NewWrapperAsType(ctx); this.UINT32_TYPE = UINT32_TYPE_NATIVE.NewWrapperAsType(ctx); this.INT64_TYPE = INT64_TYPE_NATIVE.NewWrapperAsType(ctx); this.BOOLEAN_TYPE = BOOLEAN_TYPE_NATIVE.NewWrapperAsType(ctx); this.SINGLE_TYPE = SINGLE_TYPE_NATIVE.NewWrapperAsType(ctx); this.DOUBLE_TYPE = DOUBLE_TYPE_NATIVE.NewWrapperAsType(ctx); this.INT_PTR_TYPE = INT_PTR_TYPE_NATIVE.NewWrapperAsType(ctx); this.STRING_TYPE = STRING_TYPE_NATIVE.NewWrapperAsType(ctx); this.EXCEPTION_TYPE = EXCEPTION_TYPE_NATIVE.NewWrapperAsType(ctx); //this.WEAK_EVENT_WRAPPER_TYPE = WEAK_EVENT_WRAPPER_TYPE_NATIVE.NewWrapperAsType( ctx ); //this.STRONG_EVENT_WRAPPER_TYPE = STRONG_EVENT_WRAPPER_TYPE_NATIVE.NewWrapperAsType( ctx ); this.IENUMERABLE_GDEF_TYPE = IENUMERABLE_GDEF_TYPE_NATIVE.NewWrapperAsType(ctx); this.IENUMERABLE_NO_GDEF_TYPE = IENUMERABLE_NO_GDEF_TYPE_NATIVE.NewWrapperAsType(ctx); this.USE_DEFAULTS_ATTRIBUTE_TYPE = USE_DEFAULTS_ATTRIBUTE_TYPE_NATIVE.NewWrapperAsType(ctx); this.COMPOSITE_FACTORY_TYPE = COMPOSITE_FACTORY_TYPE_NATIVE.NewWrapperAsType(ctx); this.REF_ACTION_TYPE = REF_ACTION_TYPE_NATIVE.NewWrapperAsType(ctx); this.REF_FUNCTION_TYPE = REF_FUNCTION_TYPE_NATIVE.NewWrapperAsType(ctx); this.APPLICATION_GETTER_METHOD = APPLICATION_GETTER_METHOD_NATIVE.NewWrapper(ctx); this.STRUCTURE_OWNER_GETTER_METHOD = STRUCTURE_OWNER_GETTER_METHOD_NATIVE.NewWrapper(ctx); this.APPLICATION_IS_PASSIVE_GETTER_METHOD = APPLICATION_IS_PASSIVE_GETTER_METHOD_NATIVE.NewWrapper(ctx); this.INJECTION_SERVICE_GETTER_METHOD = INJECTION_SERVICE_GETTER_METHOD_NATIVE.NewWrapper(ctx); this.COMPOSITE_METHOD_MODEL_PARAMETERS_GETTER = COMPOSITE_METHOD_MODEL_PARAMETERS_GETTER_NATIVE.NewWrapper(ctx); this.COMPOSITE_METHOD_RESULT_GETTER = COMPOSITE_METHOD_RESULT_GETTER_NATIVE.NewWrapper(ctx); //this.INJECTABLE_MODEL_INJECTION_SCOPES_GETTER = INJECTABLE_MODEL_INJECTION_SCOPES_GETTER_NATIVE.NewWrapper( ctx ); this.INJECTION_CONTEXT_PROVIDER_METHOD = INJECTION_CONTEXT_PROVIDER_METHOD_NATIVE.NewWrapper(ctx); this.OPTIONAL_ATTRIBUTE_FIELD = OPTIONAL_ATTRIBUTE_FIELD_NATIVE.NewWrapper(ctx); this.CONSTRAINT_MODELS_GETTER = CONSTRAINT_MODELS_GETTER_NATIVE.NewWrapper(ctx); this.CONSTRAINT_ATTRIBUTE_GETTER = CONSTRAINT_ATTRIBUTE_GETTER_NATIVE.NewWrapper(ctx); this.VIOLATIONS_LIST_COUNT_GETTER = VIOLATIONS_LIST_COUNT_GETTER_NATIVE.NewWrapper(ctx); this.METHOD_INFO_NATIVE_GETTER = METHOD_INFO_NATIVE_GETTER_NATIVE.NewWrapper(ctx); this.MODEL_INFO_GETTER = MODEL_INFO_GETTER_NATIVE.NewWrapper(ctx); this.MODEL_GETTER = MODEL_GETTER_NATIVE.NewWrapper(ctx); this.C_METHODS_GETTER = C_METHODS_GETTER_NATIVE.NewWrapper(ctx); this.GET_FRAGMENT_INSTANCE_POOL_METHOD = GET_FRAGMENT_INSTANCE_POOL_METHOD_NATIVE.NewWrapper(ctx); this.GET_FRAGMENT_INSTANCE_METHOD = GET_FRAGMENT_INSTANCE_METHOD_NATIVE.NewWrapper(ctx); this.TAKE_FRAGMENT_INSTANCE_METHOD = TAKE_FRAGMENT_INSTANCE_METHOD_NATIVE.NewWrapper(ctx); this.RETURN_FRAGMENT_INSTANCE_METHOD = RETURN_FRAGMENT_INSTANCE_METHOD_NATIVE.NewWrapper(ctx); this.SPECIAL_METHODS_GETTER = SPECIAL_METHODS_GETTER_NATIVE.NewWrapper(ctx); this.FRAGMENT_GETTER = FRAGMENT_GETTER_NATIVE.NewWrapper(ctx); this.FRAGMENT_SETTER = FRAGMENT_SETTER_NATIVE.NewWrapper(ctx); this.COMPOSITES_GETTER = COMPOSITES_GETTER_NATIVE.NewWrapper(ctx); this.COMPOSITES_GETTER_INDEXER = COMPOSITES_GETTER_INDEXER_NATIVE.NewWrapper(ctx); this.TYPE_OBJECT_DICTIONARY_GET_METHOD = TYPE_OBJECT_DICTIONARY_GET_METHOD_NATIVE.NewWrapper(ctx); this.GENERIC_FRAGMENT_METHOD = GENERIC_FRAGMENT_METHOD_NATIVE.NewWrapper(ctx); this.CONSTRAINT_VIOLATION_CONSTRUCTOR = CONSTRAINT_VIOLATION_CONSTRUCTOR_NATIVE.NewWrapper(ctx); this.ADD_CONSTRAINT_VIOLATION_METHOD = ADD_CONSTRAINT_VIOLATION_METHOD_NATIVE.NewWrapper(ctx); this.F_INSTANCE_SET_NEXT_INFO_METHOD = F_INSTANCE_SET_NEXT_INFO_METHOD_NATIVE.NewWrapper(ctx); this.F_INSTANCE_SET_METHOD_RESULT_METHOD = F_INSTANCE_SET_METHOD_RESULT_METHOD_NATIVE.NewWrapper(ctx); this.F_INSTANCE_GET_NEXT_INFO_METHOD = F_INSTANCE_GET_NEXT_INFO_METHOD_NATIVE.NewWrapper(ctx); this.F_INSTANCE_GET_METHOD_RESULT_METHOD = F_INSTANCE_GET_METHOD_RESULT_METHOD_NATIVE.NewWrapper(ctx); this.STRING_CONCAT_METHOD_3 = STRING_CONCAT_METHOD_3_NATIVE.NewWrapper(ctx); this.STRING_CONCAT_METHOD_2 = STRING_CONCAT_METHOD_2_NATIVE.NewWrapper(ctx); this.METHOD_INFO_GET_GARGS_METHOD = METHOD_INFO_GET_GARGS_METHOD_NATIVE.NewWrapper(ctx); this.MAKE_GENERIC_METHOD_METHOD = MAKE_GENERIC_METHOD_METHOD_NATIVE.NewWrapper(ctx); this.INVOKE_METHOD_METHOD = INVOKE_METHOD_METHOD_NATIVE.NewWrapper(ctx); this.GET_METHDO_GDEF = GET_METHDO_GDEF_NATIVE.NewWrapper(ctx); this.GET_CTOR_INDEX_METHOD = GET_CTOR_INDEX_METHOD_NATIVE.NewWrapper(ctx); this.APPLICATION_NOT_ACTIVE_EXCEPTION_CONSTRUCTOR = APPLICATION_NOT_ACTIVE_EXCEPTION_CONSTRUCTOR_NATIVE.NewWrapper(ctx); this.GET_CONSTRAINT_INSTANCE_POOL_METHOD = GET_CONSTRAINT_INSTANCE_POOL_METHOD_NATIVE.NewWrapper(ctx); this.TAKE_CONSTRAINT_INSTANCE_METHOD = TAKE_CONSTRAINT_INSTANCE_METHOD_NATIVE.NewWrapper(ctx); this.RETURN_CONSTRAINT_INSTANCE_METHOD = RETURN_CONSTRAINT_INSTANCE_METHOD_NATIVE.NewWrapper(ctx); this.IS_VALID_METHOD = IS_VALID_METHOD_NATIVE.NewWrapper(ctx); this.TO_STRING_METHOD = TO_STRING_METHOD_NATIVE.NewWrapper(ctx); this.RETURN_CONCERN_INVOCATION_METHOD = RETURN_CONCERN_INVOCATION_METHOD_NATIVE.NewWrapper(ctx); this.RETURN_SIDE_EFFECT_INVOCATION_METHOD = RETURN_SIDE_EFFECT_INVOCATION_METHOD_NATIVE.NewWrapper(ctx); this.EMPTY_OBJECTS_FIELD = EMPTY_OBJECTS_FIELD_NATIVE.NewWrapper(ctx); this.LIST_QUERY_ITEM_GETTER = LIST_QUERY_ITEM_GETTER_NATIVE.NewWrapper(ctx); this.FIELDS_GETTER = FIELDS_GETTER_NATIVE.NewWrapper(ctx); this.FIELD_SET_VALUE_METHOD = FIELD_SET_VALUE_METHOD_NATIVE.NewWrapper(ctx); this.PROTOTYPE_ACTION_CONSTRUCTOR = PROTOTYPE_ACTION_CONSTRUCTOR_NATIVE.NewWrapper(ctx); this.EQUALS_METHOD = EQUALS_METHOD_NATIVE.NewWrapper(ctx); this.HASH_CODE_METHOD = HASH_CODE_METHOD_NATIVE.NewWrapper(ctx); this.REFERENCE_EQUALS_METHOD = REFERENCE_EQUALS_METHOD_NATIVE.NewWrapper(ctx); this.GET_TYPE_METHOD = GET_TYPE_METHOD_NATIVE.NewWrapper(ctx); this.DELEGATE_COMBINE_METHOD = DELEGATE_COMBINE_METHOD_NATIVE.NewWrapper(ctx); this.DELEGATE_REMOVE_METHOD = DELEGATE_REMOVE_METHOD_NATIVE.NewWrapper(ctx); this.INTERLOCKED_COMPARE_EXCHANGE_METHOD_GDEF = INTERLOCKED_COMPARE_EXCHANGE_METHOD_GDEF_NATIVE.NewWrapper(ctx); this.GET_EVENT_INFO_METHOD = GET_EVENT_INFO_METHOD_NATIVE.NewWrapper(ctx); this.COMPOSITE_EVENT_CTOR = COMPOSITE_EVENT_CTOR_NATIVE.NewWrapper(ctx); this.INVALID_OPERATION_EXCEPTION_CTOR_WITH_STRING = INVALID_OPERATION_EXCEPTION_CTOR_WITH_STRING_NATIVE.NewWrapper(ctx); this.QNAME_FROM_TYPE_AND_NAME = QNAME_FROM_TYPE_AND_NAME_NATIVE.NewWrapper(ctx); this.IS_PROTOTYPE_GETTER = IS_PROTOTYPE_GETTER_NATIVE.NewWrapper(ctx); this.GET_PROPERTY_INFO_METHOD = GET_PROPERTY_INFO_METHOD_NATIVE.NewWrapper(ctx); this.COMPOSITE_METHODS_INDEXER = COMPOSITE_METHODS_INDEXER_NATIVE.NewWrapper(ctx); this.EVENT_MODEL_GETTER = EVENT_MODEL_GETTER_NATIVE.NewWrapper(ctx); this.PROPERTY_MODEL_GETTER = PROPERTY_MODEL_GETTER_NATIVE.NewWrapper(ctx); this.COMPOSITE_PROPERTY_CTOR = COMPOSITE_PROPERTY_CTOR_NATIVE.NewWrapper(ctx); this.INVOCATION_INFO_GETTER = INVOCATION_INFO_GETTER_NATIVE.NewWrapper(ctx); this.INVOCATION_INFO_SETTER = INVOCATION_INFO_SETTER_NATIVE.NewWrapper(ctx); this.INVOCATION_INFO_CREATOR_CTOR = INVOCATION_INFO_CREATOR_CTOR_NATIVE.NewWrapper(ctx); this.INVOCATION_INFO_METHOD_GETTER = INVOCATION_INFO_METHOD_GETTER_NATIVE.NewWrapper(ctx); this.INVOCATION_INFO_FRAGMENT_METHOD_MODEL_GETTER = INVOCATION_INFO_FRAGMENT_METHOD_MODEL_GETTER_NATIVE.NewWrapper(ctx); this.INVOCATION_INFO_FRAGMENT_METHOD_MODEL_SETTER = INVOCATION_INFO_FRAGMENT_METHOD_MODEL_SETTER_NATIVE.NewWrapper(ctx); this.CONCERN_MODELS_GETTER = CONCERN_MODELS_GETTER_NATIVE.NewWrapper(ctx); this.CONCERN_MODELS_INDEXER = CONCERN_MODELS_INDEXER_NATIVE.NewWrapper(ctx); this.MIXIN_MODEL_GETTER = MIXIN_MODEL_GETTER_NATIVE.NewWrapper(ctx); this.SIDE_EFFECT_MODELS_GETTER = SIDE_EFFECT_MODELS_GETTER_NATIVE.NewWrapper(ctx); this.SIDE_EFFECT_MODELS_INDEXER = SIDE_EFFECT_MODELS_INDEXER_NATIVE.NewWrapper(ctx); this.COLLECTION_ADD_ONLY_ADD_METHOD = COLLECTION_ADD_ONLY_ADD_METHOD_NATIVE.NewWrapper(ctx); this.ACTION_0_CTOR = ACTION_0_CTOR_NATIVE.NewWrapper(ctx); this.INTERLOCKED_EXCHANGE_METHOD_GDEF = INTERLOCKED_EXCHANGE_METHOD_GDEF_NATIVE.NewWrapper(ctx); this.GET_INVOCATION_LIST_METHOD = GET_INVOCATION_LIST_METHOD_NATIVE.NewWrapper(ctx); this.ADD_LAST_METHOD = ADD_LAST_METHOD_NATIVE.NewWrapper(ctx); //this.WEAK_EVENT_ARRAY_WRAPPER_ARRAY_GETTER = WEAK_EVENT_ARRAY_WRAPPER_ARRAY_GETTER_NATIVE.NewWrapper( ctx ); //this.WEAK_EVENT_ARRAY_WRAPPER_COUNT_GETTER = WEAK_EVENT_ARRAY_WRAPPER_COUNT_GETTER_NATIVE.NewWrapper( ctx ); //this.WEAK_EVENT_ARRAY_CLEANUP_METHOD = WEAK_EVENT_ARRAY_CLEANUP_METHOD_NATIVE.NewWrapper( ctx ); //this.WEAK_EVENT_ARRAY_COMBINE_METHOD = WEAK_EVENT_ARRAY_COMBINE_METHOD_NATIVE.NewWrapper( ctx ); //this.WEAK_EVENT_ARRAY_REMOVE_METHOD = WEAK_EVENT_ARRAY_REMOVE_METHOD_NATIVE.NewWrapper( ctx ); //this.IS_EVENT_INFO_DEAD_METHOD = IS_EVENT_INFO_DEAD_METHOD_NATIVE.NewWrapper( ctx ); //this.EVENT_INFO_TARGET_GETTER = EVENT_INFO_TARGET_GETTER_NATIVE.NewWrapper( ctx ); //this.EVENT_INFO_METHOD_GETTER = EVENT_INFO_METHOD_GETTER_NATIVE.NewWrapper( ctx ); //this.EVENT_INFO_CTOR = EVENT_INFO_CTOR_NATIVE.NewWrapper( ctx ); this.Q_NAME_GET_BARE_TYPE_NAME_METHOD = Q_NAME_GET_BARE_TYPE_NAME_METHOD_NATIVE.NewWrapper(ctx); this.Q_NAME_FROM_MEMBER_INFO_METHOD = Q_NAME_FROM_MEMBER_INFO_METHOD_NATIVE.NewWrapper(ctx); this.INJECTION_EXCEPTION_CTOR = INJECTION_EXCEPTION_CTOR_NATIVE.NewWrapper(ctx); this.CHECK_STATE_METHOD_SIG = CHECK_STATE_METHOD_SIG_NATIVE.NewWrapper(ctx); this.CONSTRAINT_EXCEPTION_VIOLATIONS_GETTER = CONSTRAINT_EXCEPTION_VIOLATIONS_GETTER_NATIVE.NewWrapper(ctx); this.CONSTRAINT_VIOLATIONS_DIC_ADD_METHOD = CONSTRAINT_VIOLATIONS_DIC_ADD_METHOD_NATIVE.NewWrapper(ctx); this.CONSTRAINT_VIOLATIONS_DIC_CTOR = CONSTRAINT_VIOLATIONS_DIC_CTOR_NATIVE.NewWrapper(ctx); this.CHECK_ACTION_FUNC_CTOR = CHECK_ACTION_FUNC_CTOR_NATIVE.NewWrapper(ctx); this.SET_DEFAULTS_METHOD_SIG = SET_DEFAULTS_METHOD_SIG_NATIVE.NewWrapper(ctx); this.CONSTRAINT_VIOLATIONS_LIST_CTOR = CONSTRAINT_VIOLATIONS_LIST_CTOR_NATIVE.NewWrapper(ctx); this.EXCEPTION_LIST_CTOR = EXCEPTION_LIST_CTOR_NATIVE.NewWrapper(ctx); this.FUNC_1_CTOR = FUNC_1_CTOR_NATIVE.NewWrapper(ctx); this.FUNC_2_CTOR = FUNC_2_CTOR_NATIVE.NewWrapper(ctx); this.FUNC_3_CTOR = FUNC_3_CTOR_NATIVE.NewWrapper(ctx); this.ACTION_1_CTOR = ACTION_1_CTOR_NATIVE.NewWrapper(ctx); this.LAZY_GDEF_CTOR = LAZY_GDEF_CTOR_NATIVE.NewWrapper(ctx); this.FRAGMENT_INSTANCE_CTOR_NO_PARAMS = FRAGMENT_INSTANCE_CTOR_NO_PARAMS_NATIVE.NewWrapper(ctx); this.FRAGMENT_INSTANCE_CTOR_WITH_PARAMS = FRAGMENT_INSTANCE_CTOR_WITH_PARAMS_NATIVE.NewWrapper(ctx); this.MODEL_CTORS_GETTER = MODEL_CTORS_GETTER_NATIVE.NewWrapper(ctx); this.FRAGMENT_DEPENDANT_GETTER = FRAGMENT_DEPENDANT_GETTER_NATIVE.NewWrapper(ctx); this.FRAGMENT_DEPENDANT_SETTER = FRAGMENT_DEPENDANT_SETTER_NATIVE.NewWrapper(ctx); this.FRAGMENT_DEPENDANT_PROPERTY = FRAGMENT_DEPENDANT_PROPERTY_NATIVE.NewWrapper(ctx); this.CONCERN_INVOCATION_INFO_ITEM_1 = CONCERN_INVOCATION_INFO_ITEM_1_NATIVE.NewWrapper(ctx); this.CONCERN_INVOCATION_INFO_ITEM_2 = CONCERN_INVOCATION_INFO_ITEM_2_NATIVE.NewWrapper(ctx); this.SIDE_EFFECT_INVOCATION_INFO_ITEM_1 = SIDE_EFFECT_INVOCATION_INFO_ITEM_1_NATIVE.NewWrapper(ctx); this.SIDE_EFFECT_INVOCATION_INFO_ITEM_2 = SIDE_EFFECT_INVOCATION_INFO_ITEM_2_NATIVE.NewWrapper(ctx); this.SIDE_EFFECT_INVOCATION_INFO_ITEM_3 = SIDE_EFFECT_INVOCATION_INFO_ITEM_3_NATIVE.NewWrapper(ctx); this.OBJECT_CTOR = OBJECT_CTOR_NATIVE.NewWrapper(ctx); this.NULLABLE_CTOR = NULLABLE_CTOR_NATIVE.NewWrapper(ctx); this.DEFAULT_CREATOR_GETTER = DEFAULT_CREATOR_GETTER_NATIVE.NewWrapper(ctx); this.DEFAULT_CREATOR_INVOKER = DEFAULT_CREATOR_INVOKER_NATIVE.NewWrapper(ctx); this.NO_POOL_ATTRIBUTE_CTOR = NO_POOL_ATTRIBUTE_CTOR_NATIVE.NewWrapper(ctx); this.MAIN_PUBLIC_COMPOSITE_TYPE_ATTRIBUTE_CTOR = MAIN_PUBLIC_COMPOSITE_TYPE_ATTRIBUTE_CTOR_NATIVE.NewWrapper(ctx); this.CONSTRAINT_VIOLATION_LIST_CTOR = CONSTRAINT_VIOLATION_LIST_CTOR_NATIVE.NewWrapper(ctx); this.CONSTRAINT_VIOLATION_EXCEPTION_CTOR = CONSTRAINT_VIOLATION_EXCEPTION_CTOR_NATIVE.NewWrapper(ctx); this.INTERNAL_EXCEPTION_CTOR = INTERNAL_EXCEPTION_CTOR_NATIVE.NewWrapper(ctx); this.AGGREGATE_EXCEPTION_EXCEPTION_ENUMERABLE_CTOR = AGGREGATE_EXCEPTION_EXCEPTION_ENUMERABLE_CTOR_NATIVE.NewWrapper(ctx); this.DEBUGGER_DISPLAY_ATTRIBUTE_STRING_CTOR = DEBUGGER_DISPLAY_ATTRIBUTE_STRING_CTOR_NATIVE.NewWrapper(ctx); this.INTERLOCKED_READ_I64_METHOD = INTERLOCKED_READ_I64_METHOD_NATIVE == null ? null : INTERLOCKED_READ_I64_METHOD_NATIVE.NewWrapper(ctx); this.INTERLOCKED_EXCHANGE_I32_METHOD = INTERLOCKED_EXCHANGE_I32_METHOD_NATIVE.NewWrapper(ctx); this.INTERLOCKED_EXCHANGE_I64_METHOD = INTERLOCKED_EXCHANGE_I64_METHOD_NATIVE.NewWrapper(ctx); this.INTERLOCKED_EXCHANGE_R32_METHOD = INTERLOCKED_EXCHANGE_R32_METHOD_NATIVE == null ? null : INTERLOCKED_EXCHANGE_R32_METHOD_NATIVE.NewWrapper(ctx); this.INTERLOCKED_EXCHANGE_R64_METHOD = INTERLOCKED_EXCHANGE_R64_METHOD_NATIVE == null ? null : INTERLOCKED_EXCHANGE_R64_METHOD_NATIVE.NewWrapper(ctx); this.INTERLOCKED_EXCHANGE_INT_PTR_METHOD = INTERLOCKED_EXCHANGE_INT_PTR_METHOD_NATIVE == null ? null : INTERLOCKED_EXCHANGE_INT_PTR_METHOD_NATIVE.NewWrapper(ctx); this.INTERLOCKED_EXCHANGE_OBJECT_METHOD = INTERLOCKED_EXCHANGE_OBJECT_METHOD_NATIVE == null ? null : INTERLOCKED_EXCHANGE_OBJECT_METHOD_NATIVE.NewWrapper(ctx); this.INTERLOCKED_COMPARE_EXCHANGE_I32_METHOD = INTERLOCKED_COMPARE_EXCHANGE_I32_METHOD_NATIVE.NewWrapper(ctx); this.INTERLOCKED_COMPARE_EXCHANGE_I64_METHOD = INTERLOCKED_COMPARE_EXCHANGE_I64_METHOD_NATIVE.NewWrapper(ctx); this.INTERLOCKED_COMPARE_EXCHANGE_R32_METHOD = INTERLOCKED_COMPARE_EXCHANGE_R32_METHOD_NATIVE == null ? null : INTERLOCKED_COMPARE_EXCHANGE_R32_METHOD_NATIVE.NewWrapper(ctx); this.INTERLOCKED_COMPARE_EXCHANGE_R64_METHOD = INTERLOCKED_COMPARE_EXCHANGE_R64_METHOD_NATIVE == null ? null : INTERLOCKED_COMPARE_EXCHANGE_R64_METHOD_NATIVE.NewWrapper(ctx); this.INTERLOCKED_COMPARE_EXCHANGE_INT_PTR_METHOD = INTERLOCKED_COMPARE_EXCHANGE_INT_PTR_METHOD_NATIVE == null ? null : INTERLOCKED_COMPARE_EXCHANGE_INT_PTR_METHOD_NATIVE.NewWrapper(ctx); this.INTERLOCKED_COMPARE_EXCHANGE_OBJECT_METHOD = INTERLOCKED_COMPARE_EXCHANGE_OBJECT_METHOD_NATIVE.NewWrapper(ctx); this.COMPOSITE_TYPE_ID_CTOR = COMPOSITE_TYPE_ID_CTOR_NATIVE.NewWrapper(ctx); this.COMPOSITE_FACTORY_METHOD = COMPOSITE_FACTORY_METHOD_NATIVE.NewWrapper(ctx); this.COMPOSITE_CALLBACK_GET_COMPOSITE_METHOD_METHOD = COMPOSITE_CALLBACK_GET_COMPOSITE_METHOD_METHOD_NATIVE.NewWrapper(ctx); this.ARGUMENT_EXCEPTION_STRING_CTOR = ARGUMENT_EXCEPTION_STRING_CTOR_NATIVE.NewWrapper(ctx); this.MAKE_GENERIC_TYPE_METHOD = MAKE_GENERIC_TYPE_METHOD_NATIVE.NewWrapper(ctx); this.GET_FIRST_INSTANCE_CTOR = GET_FIRST_INSTANCE_CTOR_NATIVE.NewWrapper(ctx); this.CONSTRUCTOR_INVOKE_METHOD = CONSTRUCTOR_INVOKE_METHOD_NATIVE.NewWrapper(ctx); this.INT_PTR_SIZE_GETTER = INT_PTR_SIZE_GETTER_NATIVE.NewWrapper(ctx); this.REF_ACTION_INVOKER = REF_ACTION_INVOKER_NATIVE.NewWrapper(ctx); this.REF_FUNCTION_INVOKER = REF_FUNCTION_INVOKER_NATIVE.NewWrapper(ctx); this.REF_INVOKER_CALLBACK_CTOR = REF_INVOKER_CALLBACK_CTOR_NATIVE.NewWrapper(ctx); this.COMPOSITE_METHOD_MODEL_INDEX_ATTRIBUTE = COMPOSITE_METHOD_MODEL_INDEX_ATTRIBUTE_NATIVE.NewWrapper(ctx); this.SPECIAL_METHOD_MODEL_INDEX_ATTRIBUTE = SPECIAL_METHOD_MODEL_INDEX_ATTRIBUTE_NATIVE.NewWrapper(ctx); this.CONSTRUCTOR_MODEL_INDEX_ATTRIBUTE = CONSTRUCTOR_MODEL_INDEX_ATTRIBUTE_NATIVE.NewWrapper(ctx); this.DOUBLE_BITS_TO_INT64 = DOUBLE_BITS_TO_INT64_NATIVE.NewWrapper(ctx); this.INT64_BITS_TO_DOUBLE = INT64_BITS_TO_DOUBLE_NATIVE.NewWrapper(ctx); this.GET_BYTES_INT32 = GET_BYTES_INT32_NATIVE.NewWrapper(ctx); this.GET_BYTES_SINGLE = GET_BYTES_INT32_NATIVE.NewWrapper(ctx); this.BYTES_TO_INT32 = GET_BYTES_INT32_NATIVE.NewWrapper(ctx); this.BYTES_TO_SINGLE = GET_BYTES_INT32_NATIVE.NewWrapper(ctx); }
public static Boolean WillDefaultValueCreatorParameterBeNull(CILProperty pInfo) { return(!pInfo.DeclaringType.ContainsGenericParameters()); }
/// <summary> /// Checks whether the property has a <c>set</c> accessor method. /// </summary> /// <param name="property">The property to check.</param> /// <returns><c>true</c> if <paramref name="property"/> has <c>set</c> accessor method; <c>false</c> otherwise.</returns> /// <seealso cref="System.Reflection.PropertyInfo.CanWrite"/> public static Boolean CanWrite(this CILProperty property) { return(property != null && property.SetMethod != null); }
/// <summary> /// Checks whether the property has a <c>get</c> accessor method. /// </summary> /// <param name="property">The property to check.</param> /// <returns><c>true</c> if <paramref name="property"/> has <c>get</c> accessor method; <c>false</c> otherwise.</returns> /// <seealso cref="System.Reflection.PropertyInfo.CanRead"/> public static Boolean CanRead(this CILProperty property) { return(property != null && property.GetMethod != null); }
/// <summary> /// Returns information about all semantically related methods of the property and how they are related. /// </summary> /// <param name="property">The property.</param> /// <returns>The information about all semantically related methods of the <paramref name="property"/> and how they are related.</returns> /// <exception cref="ArgumentNullException">If <paramref name="property"/> is <c>null</c>.</exception> public static IEnumerable <Tuple <MethodSemanticsAttributes, CILMethod> > GetSemanticMethods(this CILProperty property) { ArgumentValidator.ValidateNotNull("Property", property); var getter = property.GetMethod; if (getter != null) { yield return(Tuple.Create(MethodSemanticsAttributes.Getter, getter)); } var setter = property.SetMethod; if (setter != null) { yield return(Tuple.Create(MethodSemanticsAttributes.Setter, setter)); } }