public Serializers(IConverters converters, IContentReaders readers, IContentWriters writers, Content.ISerializers fallback) { _converters = converters; _readers = readers; _writers = writers; _fallback = fallback; }
internal override IQuestion <T> CreateQuestion <T>(ITarget target, IConverters <T> converters, CultureInfo culture) { if (typeof(T) == typeof(bool) && Contains != null) { return(Classes.Of(target).WithCulture(culture).Select(c => (T)(object)c.Contains(Contains))); } return(Apply(Classes.Of(target), converters, culture)); }
/// <summary> /// 构造配置容器 /// </summary> /// <param name="converters">转换器</param> /// <param name="locator">配置定位器</param> public Config(IConverters converters, IConfigLocator locator) { Guard.Requires <ArgumentNullException>(converters != null); Guard.Requires <ArgumentNullException>(locator != null); this.converters = converters; this.locator = locator; watches = new Dictionary <string, List <Action <object> > >(); }
public AlteredMemberContents(ISpecification <MemberInfo> specification, ISpecification <IConverter> assigned, IAlteration <IConverter> alteration, IMemberContents contents, IConverters converters, ISerializer content) { _specification = specification; _assigned = assigned; _alteration = alteration; _contents = contents; _converters = converters; _content = content; }
public IConversionExpressionWithValue Convert(IConversionExpression expression, bool toMetric) { mToMetric = toMetric; mConverter = mConverterFactory(toMetric); if (!CheckIfVisitorIsNecessary(expression)) { return(ConvertSingleExpression(expression)); } expression.Accept(this); return(mResult); }
public MemberSerializers(ISpecification <MemberInfo> content, ISerializer serializer, IIdentities identities, ISerializers serializers, IMemberSerializers members, IConverters converters, IContentMember member) { _content = content; _serializer = serializer; _identities = identities; _serializers = serializers; _members = members; _converters = converters; _member = member; }
internal override IQuestion <T> CreateQuestion <T>(ITarget target, IConverters <T> converters, CultureInfo culture) { return(Apply(TextContent.Of(target), converters, culture)); }
public EnumerationConverters(IConverters converters) : base(IsAssignableSpecification <Enum> .Default, Converters.Default, converters) { }
internal override IQuestion <T> CreateQuestion <T>(ITarget target, IConverters <T> converters, CultureInfo culture) { return(Apply(CssValue.Of(target).AndTheProperty(PropertyName), converters, culture)); }
public MemberConverters(IMemberConverterSpecification specification, IConverters converters) { _specification = specification; _converters = converters; }
public MemberSerializers(ISerializer serializer, IIdentities identities, ISerializers serializers, IMemberSerializers members, IConverters converters, IContentMember member) : this(IsContent.Instance, serializer, identities, serializers, members, converters, member) { }
public ConverterSpecification(IConverters converters) : base(converters.Get) { }
public AlteredConverters(Func <IConverter, IConverter> alter, IConverters converters) { _alter = alter; _converters = converters; }
public AlteredMemberContents(ISpecification <MemberInfo> specification, IAlteration <IConverter> alteration, IMemberContents contents, IConverters converters, ISerializer content) : this(specification, AssignedSpecification, alteration, contents, converters, content) { }
internal override IQuestion <T> CreateQuestion <T>(ITarget target, IConverters <T> converters, CultureInfo culture) { return(Apply(HtmlAttribute.Of(target).Named(AttributeName), converters, culture)); }
public ReferenceContents(IReferenceEncounters identifiers, IReferenceMaps maps, IEntities entities, IContents option, IClassification classification, IConverters converters) : this(Specification, converters.IfAssigned(), identifiers, maps, entities, option, classification) { }
public IsEnumerableElement(IConverters converters) : base(converters.IfAssigned().Inverse(), EnumerableImplementation.Instance.IfAssigned()) { }
public EnumerationConverters(IConverters previous) : this(previous, Converters.Default) { }
internal static IQuestion <T> Apply <T, TUIState>(SingleUIState <ImmutableArray <string>, TUIState> uiState, IConverters <T> converters, CultureInfo culture) where TUIState : SingleUIState <ImmutableArray <string>, TUIState> { return(uiState.WithCulture(culture).As <T>(converters)); }
internal abstract IQuestion <T> CreateQuestion <T>(ITarget target, IConverters <T> converters, CultureInfo culture);
public MemberSerializers(ISerializer serializer, IIdentities identities, ISerializers serializers, IMemberSerializers members, IConverters converters, IContentMember member) : this(IsDefinedSpecification <XmlTextAttribute> .Default, serializer, identities, serializers, members, converters, member) { }
public AlteredConverters(IAlteration <IConverter> alteration, IConverters converters) : this(alteration.Get, converters) { }
public CachedConverters(IConverters converters) : base(converters.Get) { }
internal override IQuestion <T> CreateQuestion <T>(ITarget target, IConverters <T> converters, CultureInfo culture) { return(Apply(SelectedValues.Of(target), converters, culture)); }
/// <summary> /// 设定类型转换器 /// </summary> /// <param name="converters">转换器</param> public void SetConverters(IConverters converters) { Guard.Requires <ArgumentNullException>(converters != null); this.converters = converters; }
public AlteredConverters(IAlteration <IConverter> alteration, IConverters converters) { _alteration = alteration; _converters = converters; }
public NullableStructureAwareContents(IConverters converters, IContents previous) { _converters = converters; _previous = previous; }