object FromTarget( MarkupServiceProvider serviceProvider ) { var adjusted = new PropertyReference( serviceProvider.TargetObject.GetType(), serviceProvider.Property.Reference.PropertyType, serviceProvider.Property.Reference.PropertyName ); var name = MemberInfoKeyFactory.Default.Get( adjusted ); var result = Store.Get( name ); return result; }
protected override object GetValue( MarkupServiceProvider serviceProvider ) { var result = DetermineList( serviceProvider ); if ( result != null ) { var type = result.GetType().Adapt().GetEnumerableType(); foreach ( var source in Items.Purge().Where( type.IsInstanceOfType ) ) { result.Add( source ); } } return result; }
protected virtual IList DetermineList( MarkupServiceProvider serviceProvider ) { var target = serviceProvider.TargetObject; var result = serviceProvider.Property.GetValue() as IList ?? target as IList; return result; }
protected override object GetValue( MarkupServiceProvider serviceProvider ) => Locator.GetService( ServiceType );
protected override object GetValue( MarkupServiceProvider serviceProvider ) => Instance.Get();
protected abstract object GetValue( MarkupServiceProvider serviceProvider );
protected override object GetValue( MarkupServiceProvider serviceProvider ) => Evaluator.Evaluate( item, expression );
protected override object GetValue( MarkupServiceProvider serviceProvider ) => serviceProvider.Get<IXamlTypeResolver>().Resolve( TypeName );
protected override object GetValue( MarkupServiceProvider serviceProvider ) => SourceFactory.Default.Get( FactoryType );
protected override object GetValue( MarkupServiceProvider serviceProvider ) => Evaluator.Evaluate( serviceProvider.Get<IRootObjectProvider>().RootObject.GetType().Assembly.GetCustomAttribute( attributeType ), expression );
protected override object GetValue( MarkupServiceProvider serviceProvider ) { var name = key ?? MemberInfoKeyFactory.Default.Get( serviceProvider.Property.Reference ); var result = Store.Get( name ) ?? FromTarget( serviceProvider ); return result; }
protected override object GetValue( MarkupServiceProvider serviceProvider ) { var item = System.IO.Path.IsPathRooted( Path ) ? Path : System.IO.Path.GetFullPath( Path ); var result = Directory.CreateDirectory( item ); return result; }
protected override object GetValue( MarkupServiceProvider serviceProvider ) => key;