private static string GetName(CachedMember member, Action <NamingConventions <ArrayItemContext> > config)
        {
            var convention = ArrayItemNamingConventions.Create();

            config(convention);
            return(convention.GetName(new ArrayItemContext(ModelType, member,
                                                           new Context(Options, Mode.Deserialize, "xml"))));
        }
Esempio n. 2
0
 public Options()
 {
     Serialization            = new SerializationOptions(this);
     Deserialization          = new DeserializationOptions(this);
     EnumValueNameConventions = EnumValueNamingConventions.Create();
     PropertyNameConventions  = MemberNamingConventions.Create();
     FieldNameConventions     = MemberNamingConventions.Create();
     ArrayItemNameConventions = ArrayItemNamingConventions.Create();
     TypeNameConventions      = TypeNamingConvention.Create();
 }
 private string GetName <T>(string member, Options options = null)
 {
     return(ArrayItemNamingConventions.Create()
            .GetName(new ArrayItemContext(typeof(T).ToCachedType(), new CachedMember(typeof(T).GetMember(member)[0]),
                                          new Context(options ?? Options.Create(), Mode.Deserialize, "xml"))));
 }