public ILRuntimePropertyInfo(Mono.Cecil.PropertyDefinition definition, ILType dType) { this.definition = definition; this.dType = dType; appdomain = dType.AppDomain; }
protected Exception CreateException (int code, Exception innerException, TProperty property, string message, params object[] args) { if (property == null) return CreateException (code, innerException, (TMethod) null, message, args); var getter = GetGetMethod (property); if (getter != null) return CreateException (code, innerException, getter, message, args); return CreateException (code, innerException, GetSetMethod (property), message, args); }
public PropertyRecord(string name, Mono.Cecil.PropertyDefinition pd, ClassRecord activity) { Name = name; Type = pd.PropertyType.FullName; Activity = activity; }
protected abstract TType GetPropertyType (TProperty property);
protected Exception CreateException (int code, TProperty property, string message, params object[] args) { return CreateException (code, null, property, message, args); }
protected abstract CategoryAttribute GetCategoryAttribute (TType type); // Return null if no attribute is found. Do not consider base types. protected abstract ConnectAttribute GetConnectAttribute (TProperty property); // Return null if no attribute is found. Do not consider inherited properties.
protected abstract string GetPropertyName (TProperty property);
protected abstract ExportAttribute GetExportAttribute (TProperty property); // Return null if no attribute is found. Must check the base property (i.e. if property is overriding a property in a base class, must check the overridden property for the attribute).
protected abstract bool IsStatic (TProperty property);
protected abstract TMethod GetSetMethod (TProperty property);
private PropertyRecord AddProperty(Mono.Cecil.PropertyDefinition pd) { return(AddProperty(pd.Name, pd)); }
private bool IsInheritedProperty(Mono.Cecil.PropertyDefinition pd) { return(IsActivityProperty(pd) && !(pd.GetMethod.IsVirtual && properties.TryGetValue(pd.Name, out PropertyRecord pr))); }