private static string GetTypeName(Action <NamingConventions <TypeContext> > config)
        {
            var convention = TypeNamingConvention.Create();

            config(convention);
            return(convention.GetName(new TypeContext(ModelType.ToCachedType(), new Context(Options, Mode.Deserialize, "xml"), true)));
        }
Beispiel #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(Type type, bool isRoot = false, Options options = null)
 {
     return(TypeNamingConvention.Create()
            .GetName(new TypeContext(type.ToCachedType(), new Context(options ?? Options.Create(), Mode.Deserialize, "xml"), isRoot)));
 }