Example #1
0
 internal override void vmethod_1(BinaryReader reader)
 {
     this.typeBools_0 = (BfType.TypeBools)reader.ReadInt16();
     this.bool_0      = reader.ReadBoolean();
     this.bool_1      = reader.ReadBoolean();
     this.int_0       = reader.ReadInt32();
     this.string_1    = reader.ReadString();
     this.int_1       = reader.ReadInt32();
     this.bfType_0    = new BfType
     {
         Id = reader.ReadInt32()
     };
     this.fieldCollection_0.method_6(reader);
     this.methodCollection_0.method_6(reader);
     this.eventCollection_0.method_6(reader);
     this.typeCollection_0.method_6(reader);
     this.typeCollection_1.method_6(reader);
     this.typeCollection_2.method_6(reader);
     this.typeCollection_3.method_6(reader);
     this.bfAssembly_0 = new BfAssembly
     {
         Id = reader.ReadInt32()
     };
     this.bfNamespace_0 = new BfNamespace
     {
         Id = reader.ReadInt32()
     };
 }
Example #2
0
 internal BfType(BfCache cache, TypeDefinition type, BfAssembly assembly)
 {
     this.typeDefinition_0 = type;
     this.bfCache_0        = cache;
     this.string_1         = this.typeDefinition_0.Name;
     this.bfAssembly_0     = assembly;
     this.bfNamespace_0    = cache.method_13(this);
     this.IsClass          = this.typeDefinition_0.IsClass;
     this.IsEnum           = this.typeDefinition_0.IsEnum;
     this.IsValueType      = this.typeDefinition_0.IsValueType;
     this.IsInterface      = this.typeDefinition_0.IsInterface;
     if (this.typeDefinition_0.IsNestedAssembly)
     {
         this.IsNested   = true;
         this.IsInternal = true;
     }
     if (this.typeDefinition_0.IsNestedFamily)
     {
         this.IsNested    = true;
         this.IsProtected = true;
     }
     if (this.typeDefinition_0.IsNestedFamilyAndAssembly)
     {
         this.IsNested = true;
         this.IsProtectedAndInternal = true;
     }
     if (this.typeDefinition_0.IsNestedFamilyOrAssembly)
     {
         this.IsNested = true;
         this.IsProtectedOrInternal = true;
     }
     if (this.typeDefinition_0.IsNestedPrivate)
     {
         this.IsNested  = true;
         this.IsPrivate = true;
     }
     if (this.typeDefinition_0.IsNestedPublic)
     {
         this.IsNested = true;
         this.IsPublic = true;
     }
     this.IsInternal = this.typeDefinition_0.IsNotPublic;
     this.IsPublic   = this.typeDefinition_0.IsPublic;
     if (this.typeDefinition_0.IsSealed && this.typeDefinition_0.IsAbstract)
     {
         this.IsStatic = true;
     }
     else
     {
         this.IsSealed   = this.typeDefinition_0.IsSealed;
         this.IsAbstract = this.typeDefinition_0.IsAbstract;
     }
 }
Example #3
0
 internal override void vmethod_2(BfCache cache)
 {
     this.bfType_0 = ((this.bfType_0.Id == -1) ? null : cache.Types[this.bfType_0.Id]);
     this.fieldCollection_0.method_9(cache);
     this.methodCollection_0.method_9(cache);
     this.eventCollection_0.method_9(cache);
     this.typeCollection_0.method_9(cache);
     this.typeCollection_1.method_9(cache);
     this.typeCollection_2.method_9(cache);
     this.typeCollection_3.method_9(cache);
     this.bfAssembly_0  = ((this.bfAssembly_0.Id == -1) ? null : cache.Assemblies[this.bfAssembly_0.Id]);
     this.bfNamespace_0 = ((this.bfNamespace_0.Id == -1) ? null : cache.Namespaces[this.bfNamespace_0.Id]);
 }
Example #4
0
		internal BfNamespace method_13(BfType bfType_0)
		{
			BfNamespace bfNamespace = null;
			string text = null;
			BfNamespace result;
			try
			{
				text = BfCache.smethod_4(bfType_0.method_2().FullName);
				if (!this.sortedDictionary_1.ContainsKey(text))
				{
					bfNamespace = new BfNamespace(this, text);
					this.sortedDictionary_1.Add(text, bfNamespace);
					this.namespaceCollection_0.method_1(bfNamespace);
				}
				else
				{
					bfNamespace = this.sortedDictionary_1[text];
				}
				if (bfNamespace.Types == null)
				{
					Logger.LogError("BfNamespace: '" + bfNamespace.FullName + "' had null collection - " + bfType_0.FullName);
					bfNamespace.Types = new TypeCollection();
				}
				bfNamespace.Types.method_1(bfType_0);
				result = bfNamespace;
			}
			catch (Exception)
			{
				Builder builder = new Builder("\r\n");
				try
				{
					builder.Append("type == null => " + (bfType_0 == null));
					builder.Append("type = " + bfType_0.ToString());
				}
				catch
				{
				}
				try
				{
					builder.Append("type.Assembly = " + bfType_0.Assembly.ToString());
				}
				catch
				{
				}
				try
				{
					builder.Append("type.TypeDef.Name = " + bfType_0.method_2().Name);
				}
				catch
				{
				}
				try
				{
					builder.Append("type.TypeDef == null => " + (bfType_0.method_2() == null));
					builder.Append("type.TypeDef = " + bfType_0.method_2().ToString());
				}
				catch
				{
				}
				try
				{
					builder.Append("type.TypeDef.FullName == null => " + (bfType_0.method_2().FullName == null));
					builder.Append("type.TypeDef.FullName = " + bfType_0.method_2().FullName.ToString());
				}
				catch
				{
				}
				try
				{
					builder.Append("myNamespace == null => " + (text == null));
					builder.Append("myNamespace = " + text.ToString());
				}
				catch
				{
				}
				try
				{
					builder.Append("_namespaceDictionary == null => " + (this.sortedDictionary_1 == null));
					builder.Append("_namespaceDictionary = " + this.sortedDictionary_1.Count<KeyValuePair<string, BfNamespace>>());
				}
				catch
				{
				}
				try
				{
					builder.Append("_namespaces == null => " + (this.namespaceCollection_0 == null));
					builder.Append("_namespaces = " + this.namespaceCollection_0.Count<BfNamespace>());
				}
				catch
				{
				}
				try
				{
					builder.Append("bfNamespace == null => " + (bfNamespace == null));
					builder.Append("bfNamespace = " + bfNamespace);
				}
				catch
				{
				}
				try
				{
					builder.Append("bfNamespace.Types == null => " + (bfNamespace.Types == null));
					builder.Append("bfNamespace.Types = " + bfNamespace.Types.Count<BfType>());
				}
				catch
				{
				}
				throw new NitriqException("NamespaceProblems", builder.ToString());
			}
			return result;
		}
Example #5
0
        internal BfNamespace method_13(BfType bfType_0)
        {
            BfNamespace bfNamespace = null;
            string      text        = null;
            BfNamespace result;

            try
            {
                text = BfCache.smethod_4(bfType_0.method_2().FullName);
                if (!this.sortedDictionary_1.ContainsKey(text))
                {
                    bfNamespace = new BfNamespace(this, text);
                    this.sortedDictionary_1.Add(text, bfNamespace);
                    this.namespaceCollection_0.method_1(bfNamespace);
                }
                else
                {
                    bfNamespace = this.sortedDictionary_1[text];
                }
                if (bfNamespace.Types == null)
                {
                    Logger.LogError("BfNamespace: '" + bfNamespace.FullName + "' had null collection - " + bfType_0.FullName);
                    bfNamespace.Types = new TypeCollection();
                }
                bfNamespace.Types.method_1(bfType_0);
                result = bfNamespace;
            }
            catch (Exception)
            {
                Builder builder = new Builder("\r\n");
                try
                {
                    builder.Append("type == null => " + (bfType_0 == null));
                    builder.Append("type = " + bfType_0.ToString());
                }
                catch
                {
                }
                try
                {
                    builder.Append("type.Assembly = " + bfType_0.Assembly.ToString());
                }
                catch
                {
                }
                try
                {
                    builder.Append("type.TypeDef.Name = " + bfType_0.method_2().Name);
                }
                catch
                {
                }
                try
                {
                    builder.Append("type.TypeDef == null => " + (bfType_0.method_2() == null));
                    builder.Append("type.TypeDef = " + bfType_0.method_2().ToString());
                }
                catch
                {
                }
                try
                {
                    builder.Append("type.TypeDef.FullName == null => " + (bfType_0.method_2().FullName == null));
                    builder.Append("type.TypeDef.FullName = " + bfType_0.method_2().FullName.ToString());
                }
                catch
                {
                }
                try
                {
                    builder.Append("myNamespace == null => " + (text == null));
                    builder.Append("myNamespace = " + text.ToString());
                }
                catch
                {
                }
                try
                {
                    builder.Append("_namespaceDictionary == null => " + (this.sortedDictionary_1 == null));
                    builder.Append("_namespaceDictionary = " + this.sortedDictionary_1.Count <KeyValuePair <string, BfNamespace> >());
                }
                catch
                {
                }
                try
                {
                    builder.Append("_namespaces == null => " + (this.namespaceCollection_0 == null));
                    builder.Append("_namespaces = " + this.namespaceCollection_0.Count <BfNamespace>());
                }
                catch
                {
                }
                try
                {
                    builder.Append("bfNamespace == null => " + (bfNamespace == null));
                    builder.Append("bfNamespace = " + bfNamespace);
                }
                catch
                {
                }
                try
                {
                    builder.Append("bfNamespace.Types == null => " + (bfNamespace.Types == null));
                    builder.Append("bfNamespace.Types = " + bfNamespace.Types.Count <BfType>());
                }
                catch
                {
                }
                throw new NitriqException("NamespaceProblems", builder.ToString());
            }
            return(result);
        }
Example #6
0
		internal override void vmethod_2(BfCache cache)
		{
			this.bfType_0 = ((this.bfType_0.Id == -1) ? null : cache.Types[this.bfType_0.Id]);
			this.fieldCollection_0.method_9(cache);
			this.methodCollection_0.method_9(cache);
			this.eventCollection_0.method_9(cache);
			this.typeCollection_0.method_9(cache);
			this.typeCollection_1.method_9(cache);
			this.typeCollection_2.method_9(cache);
			this.typeCollection_3.method_9(cache);
			this.bfAssembly_0 = ((this.bfAssembly_0.Id == -1) ? null : cache.Assemblies[this.bfAssembly_0.Id]);
			this.bfNamespace_0 = ((this.bfNamespace_0.Id == -1) ? null : cache.Namespaces[this.bfNamespace_0.Id]);
		}
Example #7
0
		internal override void vmethod_1(BinaryReader reader)
		{
			this.typeBools_0 = (BfType.TypeBools)reader.ReadInt16();
			this.bool_0 = reader.ReadBoolean();
			this.bool_1 = reader.ReadBoolean();
			this.int_0 = reader.ReadInt32();
			this.string_1 = reader.ReadString();
			this.int_1 = reader.ReadInt32();
			this.bfType_0 = new BfType
			{
				Id = reader.ReadInt32()
			};
			this.fieldCollection_0.method_6(reader);
			this.methodCollection_0.method_6(reader);
			this.eventCollection_0.method_6(reader);
			this.typeCollection_0.method_6(reader);
			this.typeCollection_1.method_6(reader);
			this.typeCollection_2.method_6(reader);
			this.typeCollection_3.method_6(reader);
			this.bfAssembly_0 = new BfAssembly
			{
				Id = reader.ReadInt32()
			};
			this.bfNamespace_0 = new BfNamespace
			{
				Id = reader.ReadInt32()
			};
		}
Example #8
0
		internal BfType(BfCache cache, TypeDefinition type, BfAssembly assembly)
		{
			this.typeDefinition_0 = type;
			this.bfCache_0 = cache;
			this.string_1 = this.typeDefinition_0.Name;
			this.bfAssembly_0 = assembly;
			this.bfNamespace_0 = cache.method_13(this);
			this.IsClass = this.typeDefinition_0.IsClass;
			this.IsEnum = this.typeDefinition_0.IsEnum;
			this.IsValueType = this.typeDefinition_0.IsValueType;
			this.IsInterface = this.typeDefinition_0.IsInterface;
			if (this.typeDefinition_0.IsNestedAssembly)
			{
				this.IsNested = true;
				this.IsInternal = true;
			}
			if (this.typeDefinition_0.IsNestedFamily)
			{
				this.IsNested = true;
				this.IsProtected = true;
			}
			if (this.typeDefinition_0.IsNestedFamilyAndAssembly)
			{
				this.IsNested = true;
				this.IsProtectedAndInternal = true;
			}
			if (this.typeDefinition_0.IsNestedFamilyOrAssembly)
			{
				this.IsNested = true;
				this.IsProtectedOrInternal = true;
			}
			if (this.typeDefinition_0.IsNestedPrivate)
			{
				this.IsNested = true;
				this.IsPrivate = true;
			}
			if (this.typeDefinition_0.IsNestedPublic)
			{
				this.IsNested = true;
				this.IsPublic = true;
			}
			this.IsInternal = this.typeDefinition_0.IsNotPublic;
			this.IsPublic = this.typeDefinition_0.IsPublic;
			if (this.typeDefinition_0.IsSealed && this.typeDefinition_0.IsAbstract)
			{
				this.IsStatic = true;
			}
			else
			{
				this.IsSealed = this.typeDefinition_0.IsSealed;
				this.IsAbstract = this.typeDefinition_0.IsAbstract;
			}
		}