internal static Type ToAspectArgumentImpl(this IAspectDefinition aspectDefinition) { IPropertyAspectDefinition propertyAspectDefinition = null; var methodAspectDefinition = aspectDefinition as IMethodAspectDefinition; if (methodAspectDefinition.IsNotNull()) { return(methodAspectDefinition.ToAspectArgumentImpl()); } propertyAspectDefinition = aspectDefinition as IPropertyAspectDefinition; if (propertyAspectDefinition.IsNotNull()) { return(propertyAspectDefinition.ToAspectArgumentImpl()); } return(((IEventAspectDefinition)aspectDefinition).ToAspectArgumentImpl()); }
internal static BindingSettings ToBindingSettings(this IAspectDefinition aspectDefinition) { IPropertyAspectDefinition propertyAspectDefinition = null; var methodAspectDefinition = aspectDefinition as IMethodAspectDefinition; if (methodAspectDefinition.IsNotNull()) { return(methodAspectDefinition.ToMethodBindingSettings()); } propertyAspectDefinition = aspectDefinition as IPropertyAspectDefinition; if (propertyAspectDefinition.IsNotNull()) { return(propertyAspectDefinition.ToPropertyBindingSettings()); } return(((IEventAspectDefinition)aspectDefinition).ToEventBindingSettings()); }