Пример #1
0
        private static string GetFullyQualifiedTypeName(Type t, GInterface3 binder)
        {
            string str;
            string str1;

            if (binder == null)
            {
                return(t.AssemblyQualifiedName);
            }
            binder.BindToName(t, out str, out str1);
            return(string.Concat(str1, (str == null ? "" : string.Concat(", ", str))));
        }
Пример #2
0
 public JsonSerializer()
 {
     Class6.yDnXvgqzyB5jw();
     base();
     this._referenceLoopHandling      = Newtonsoft.Json.ReferenceLoopHandling.Error;
     this._missingMemberHandling      = Newtonsoft.Json.MissingMemberHandling.Ignore;
     this._nullValueHandling          = Newtonsoft.Json.NullValueHandling.Include;
     this._defaultValueHandling       = Newtonsoft.Json.DefaultValueHandling.Include;
     this._objectCreationHandling     = Newtonsoft.Json.ObjectCreationHandling.Auto;
     this._preserveReferencesHandling = Newtonsoft.Json.PreserveReferencesHandling.None;
     this._constructorHandling        = Newtonsoft.Json.ConstructorHandling.Default;
     this._typeNameHandling           = Newtonsoft.Json.TypeNameHandling.None;
     this._metadataPropertyHandling   = Newtonsoft.Json.MetadataPropertyHandling.Default;
     this._context             = JsonSerializerSettings.DefaultContext;
     this._serializationBinder = DefaultSerializationBinder.Instance;
     this._culture             = JsonSerializerSettings.DefaultCulture;
     this._contractResolver    = DefaultContractResolver.Instance;
 }
Пример #3
0
        public static string GetTypeName(Type t, TypeNameAssemblyFormatHandling assemblyFormat, GInterface3 binder)
        {
            string fullyQualifiedTypeName = ReflectionUtils.GetFullyQualifiedTypeName(t, binder);

            if (assemblyFormat == TypeNameAssemblyFormatHandling.Simple)
            {
                return(ReflectionUtils.RemoveAssemblyDetails(fullyQualifiedTypeName));
            }
            if (assemblyFormat != TypeNameAssemblyFormatHandling.Full)
            {
                throw new ArgumentOutOfRangeException();
            }
            return(fullyQualifiedTypeName);
        }