コード例 #1
0
        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)));
        }
コード例 #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();
 }
コード例 #3
0
 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)));
 }