public MyPropertyInfo(PropertyDefinition propertyDefinition, MyClassInfo declaringType) : base() { this.name = propertyDefinition.Name; string[] readableForms = Tools.GetHumanReadableForms(propertyDefinition.PropertyType); this.typeFullName = readableForms[0]; this.typeFullNameWithoutRevArrayStrings = readableForms[1]; this.declaringType = declaringType; MethodDefinition getterInfo = propertyDefinition.GetMethod; MethodDefinition setterInfo = propertyDefinition.SetMethod; this.hasGetter = getterInfo != null; this.hasSetter = setterInfo != null; MethodDefinition getterOrSetterInfo = getterInfo != null ? getterInfo : setterInfo; Debug.Assert(getterOrSetterInfo != null, "Impossible! Property must have either getter or setter or both."); this.attributes = GetMyPropertyAttributes(propertyDefinition); this.underlyingMethodsAttributes = GetMyInvokableMemberAttributes(getterOrSetterInfo); this.parametersNames = new List<string>(); this.parameters = new Dictionary<string, MyParameterInfo>(); this.exceptionsDescrs = new List<ExceptionDescr>(); AddParameters(getterInfo, setterInfo); this.CheckSupport(propertyDefinition.Attributes, getterOrSetterInfo.Attributes); }
public MyPropertyInfo(PropertyDefinition propertyDefinition, MyClassInfo declaringType) : base() { this.name = propertyDefinition.Name; string[] readableForms = Tools.GetHumanReadableForms(propertyDefinition.PropertyType); this.typeFullName = readableForms[0]; this.typeFullNameWithoutRevArrayStrings = readableForms[1]; this.declaringType = declaringType; MethodDefinition getterInfo = propertyDefinition.GetMethod; MethodDefinition setterInfo = propertyDefinition.SetMethod; this.hasGetter = getterInfo != null; this.hasSetter = setterInfo != null; MethodDefinition getterOrSetterInfo = getterInfo != null ? getterInfo : setterInfo; Debug.Assert(getterOrSetterInfo != null, "Impossible! Property must have either getter or setter or both."); this.attributes = GetMyPropertyAttributes(propertyDefinition); this.underlyingMethodsAttributes = GetMyInvokableMemberAttributes(getterOrSetterInfo); this.parametersNames = new List <string>(); this.parameters = new Dictionary <string, MyParameterInfo>(); this.exceptionsDescrs = new List <ExceptionDescr>(); AddParameters(getterInfo, setterInfo); this.CheckSupport(propertyDefinition.Attributes, getterOrSetterInfo.Attributes); }
private static string MyPropertyAndMyInvokableMemberAttributesToString(MyPropertyAttributes myPropertyAttributes, MyInvokableMemberAttributes myInvokableMemberAttributes) { // for now only MyInvokableMemberInfo attributes return MyInvokableMemberInfo.MyInvokableMemberAttributesToString(myInvokableMemberAttributes); }
private static string MyPropertyAndMyInvokableMemberAttributesToString(MyPropertyAttributes myPropertyAttributes, MyInvokableMemberAttributes myInvokableMemberAttributes) { // for now only MyInvokableMemberInfo attributes return(MyInvokableMemberInfo.MyInvokableMemberAttributesToString(myInvokableMemberAttributes)); }
private static MyPropertyAttributes GetMyPropertyAttributes(PropertyDefinition propertyDefinition) { MyPropertyAttributes myPropertyAttributes = MyPropertyAttributes.None; return(myPropertyAttributes); }