コード例 #1
0
 private void method_11(BfType bfType_0)
 {
     foreach (BfField current in ((IEnumerable <BfField>)bfType_0.Fields))
     {
         foreach (BfMethod current2 in ((IEnumerable <BfMethod>)current.GotByMethods))
         {
             current2.FieldGets.method_3(current);
         }
         foreach (BfMethod current2 in ((IEnumerable <BfMethod>)current.SetByMethods))
         {
             current2.FieldSets.method_3(current);
         }
         this.Fields.method_3(current);
     }
     foreach (BfMethod current3 in ((IEnumerable <BfMethod>)bfType_0.Methods))
     {
         foreach (BfMethod current2 in ((IEnumerable <BfMethod>)current3.CalledBy))
         {
             current2.Calls.method_3(current3);
         }
         this.Methods.method_3(current3);
     }
     foreach (BfEvent current4 in ((IEnumerable <BfEvent>)bfType_0.Events))
     {
         this.Events.method_3(current4);
     }
 }
コード例 #2
0
ファイル: BfType.cs プロジェクト: seemantr/Source-Code-Nitriq
 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()
     };
 }
コード例 #3
0
 internal BfMember(BfCache cache, MemberReference memberRef, BfType type)
 {
     this._name     = memberRef.Name;
     this._fullName = type.FullName + "." + this._name;
     this._cache    = cache;
     this._type     = type;
 }
コード例 #4
0
 internal override void vmethod_2(BfCache cache)
 {
     base.vmethod_2(cache);
     this.bfType_0 = ((this.bfType_0.Id == -1) ? null : cache.Types[this.bfType_0.Id]);
     this.methodCollection_0.method_9(cache);
     this.methodCollection_1.method_9(cache);
 }
コード例 #5
0
		internal BfMember(BfCache cache, MemberReference memberRef, BfType type)
		{
			this._name = memberRef.Name;
			this._fullName = type.FullName + "." + this._name;
			this._cache = cache;
			this._type = type;
		}
コード例 #6
0
 private void method_2(BfType bfType_0)
 {
     bfType_0.IsDelegate = true;
     foreach (BfType current in ((IEnumerable <BfType>)bfType_0.DerivedTypes))
     {
         this.method_2(current);
     }
 }
コード例 #7
0
 internal override void vmethod_1(BinaryReader reader)
 {
     base.vmethod_1(reader);
     this.int_0        = reader.ReadInt32();
     this.eventBools_0 = (BfEvent.EventBools)reader.ReadByte();
     this.bfType_0     = new BfType
     {
         Id = reader.ReadInt32()
     };
 }
コード例 #8
0
 internal override void vmethod_1(BinaryReader reader)
 {
     this._name     = reader.ReadString();
     this._fullName = reader.ReadString();
     this._type     = new BfType
     {
         Id = reader.ReadInt32()
     };
     this._typesUsed.method_6(reader);
 }
コード例 #9
0
ファイル: BfType.cs プロジェクト: seemantr/Source-Code-Nitriq
 private void method_9(BfType bfType_1)
 {
     if (bfType_1 != null)
     {
         if (this.bfAssembly_0.IsCoreAssembly)
         {
             this.typeCollection_2.method_1(bfType_1);
         }
         bfType_1.TypesUsing.method_1(this);
     }
 }
コード例 #10
0
ファイル: BfType.cs プロジェクト: seemantr/Source-Code-Nitriq
 internal void method_4()
 {
     if (this.bool_0)
     {
         Logger.LogWarning("Type.Populate1", "populate got called more than once");
     }
     else
     {
         this.bool_0 = true;
         if (this.IsInCoreAssembly)
         {
             this.bfType_0 = this.bfCache_0.method_7(this.typeDefinition_0.BaseType);
             if (this.bfType_0 != null && this.bfType_0.FullName != "System.Object")
             {
                 this.bfType_0.DerivedTypes.method_1(this);
             }
             foreach (TypeReference typeReference_ in this.typeDefinition_0.Interfaces)
             {
                 BfType bfType = this.bfCache_0.method_7(typeReference_);
                 this.typeCollection_0.method_1(bfType);
                 bfType.DerivedTypes.method_1(this);
             }
             foreach (FieldDefinition fieldDef in this.typeDefinition_0.Fields)
             {
                 BfField item = new BfField(this.bfCache_0, fieldDef, this);
                 this.fieldCollection_0.method_1(item);
             }
             foreach (MethodDefinition methodDef in this.typeDefinition_0.Methods)
             {
                 BfMethod bfMethod = new BfMethod(this.bfCache_0, methodDef, this);
                 this.methodCollection_0.method_1(bfMethod);
                 this.bfAssembly_0.method_5().Add(bfMethod.UniqueName, bfMethod);
             }
             foreach (MethodDefinition methodDef in this.typeDefinition_0.Constructors)
             {
                 BfMethod bfMethod = new BfMethod(this.bfCache_0, methodDef, this);
                 this.methodCollection_0.method_1(bfMethod);
                 this.bfAssembly_0.method_5().Add(bfMethod.UniqueName, bfMethod);
             }
             foreach (EventDefinition eventDef in this.typeDefinition_0.Events)
             {
                 BfEvent item2 = new BfEvent(this.bfCache_0, eventDef, this);
                 this.eventCollection_0.method_1(item2);
             }
             this.int_1 = this.typeDefinition_0.GenericParameters.Count;
             this.method_6();
             this.typeCollection_0.ClearHash();
             this.fieldCollection_0.ClearHash();
             this.methodCollection_0.ClearHash();
             this.eventCollection_0.ClearHash();
         }
     }
 }
コード例 #11
0
ファイル: BfType.cs プロジェクト: seemantr/Source-Code-Nitriq
 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]);
 }
コード例 #12
0
 internal override void vmethod_1(BinaryReader reader)
 {
     base.vmethod_1(reader);
     this.int_0        = reader.ReadInt32();
     this.string_0     = reader.ReadString();
     this.fieldBools_0 = (BfField.FieldBools)reader.ReadByte();
     this.bfType_0     = new BfType
     {
         Id = reader.ReadInt32()
     };
     this.methodCollection_0.method_6(reader);
     this.methodCollection_1.method_6(reader);
 }
コード例 #13
0
 internal BfEvent(BfCache cache, EventDefinition eventDef, BfType type) : base(cache, eventDef, type)
 {
     this.eventDefinition_0 = eventDef;
     this.int_0             = this._cache.method_21();
     this.bfType_0          = this._cache.method_7(this.eventDefinition_0.EventType);
     this._typesUsed.method_1(this.bfType_0);
     this._typesUsed.method_2(this._cache.method_8(this.eventDefinition_0.EventType));
     this._typesUsed.ClearHash();
     this.IsInternal  = this.eventDefinition_0.AddMethod.IsAssembly;
     this.IsProtected = this.eventDefinition_0.AddMethod.IsFamily;
     this.IsPrivate   = this.eventDefinition_0.AddMethod.IsPrivate;
     this.IsPublic    = this.eventDefinition_0.AddMethod.IsPublic;
     this.IsStatic    = this.eventDefinition_0.AddMethod.IsStatic;
     this._cache.Events.method_1(this);
 }
コード例 #14
0
        internal BfMethod method_5(MethodReference methodReference_0)
        {
            BfAssembly bfAssembly;
            BfMethod   result;

            if (methodReference_0.DeclaringType.Scope is AssemblyNameReference)
            {
                bfAssembly = this.dictionary_0[((AssemblyNameReference)methodReference_0.DeclaringType.Scope).FullName];
            }
            else
            {
                if (!(methodReference_0.DeclaringType.Scope is ModuleDefinition))
                {
                    Logger.LogWarning("GetBfMethod1", "Couldn't find assembly for method: " + methodReference_0.ToString());
                    result = null;
                    return(result);
                }
                bfAssembly = this.dictionary_0[((ModuleDefinition)methodReference_0.DeclaringType.Scope).Assembly.Name.FullName];
            }
            string   text = BfMethod.smethod_0(methodReference_0);
            BfMethod bfMethod;

            bfAssembly.method_5().TryGetValue(text, out bfMethod);
            if (bfMethod == null)
            {
                BfType bfType = this.method_7(methodReference_0.DeclaringType);
                List <MethodDefinition> list = new List <MethodDefinition>();
                list.AddRange(bfType.method_2().Constructors.Cast <MethodDefinition>());
                list.AddRange(bfType.method_2().Methods.Cast <MethodDefinition>());
                foreach (MethodDefinition current in list)
                {
                    if (text == BfMethod.smethod_0(current))
                    {
                        bfMethod = new BfMethod(this, current, bfType);
                        this.methodCollection_0.method_1(bfMethod);
                        bfType.Methods.method_1(bfMethod);
                        bfAssembly.method_5().Add(bfMethod.UniqueName, bfMethod);
                        break;
                    }
                }
                if (bfMethod == null)
                {
                    Logger.LogWarning("GetBfMethod2", "Couldn't find: " + text);
                }
            }
            result = bfMethod;
            return(result);
        }
コード例 #15
0
 internal BfField(BfCache cache, FieldDefinition fieldDef, BfType type) : base(cache, fieldDef, type)
 {
     this.fieldDefinition_0      = fieldDef;
     this.int_0                  = cache.method_20();
     this.IsInternal             = this.fieldDefinition_0.IsAssembly;
     this.IsProtected            = this.fieldDefinition_0.IsFamily;
     this.IsProtectedAndInternal = this.fieldDefinition_0.IsFamilyAndAssembly;
     this.IsProtectedOrInternal  = this.fieldDefinition_0.IsFamilyOrAssembly;
     this.IsPrivate              = this.fieldDefinition_0.IsPrivate;
     this.IsPublic               = this.fieldDefinition_0.IsPublic;
     this.IsStatic               = this.fieldDefinition_0.IsStatic;
     this.IsConstant             = this.fieldDefinition_0.HasConstant;
     this.bfType_0               = this._cache.method_7(this.fieldDefinition_0.FieldType);
     this._typesUsed.method_1(this.bfType_0);
     this._typesUsed.method_2(this._cache.method_8(this.fieldDefinition_0.FieldType));
     this._typesUsed.ClearHash();
     this.string_0 = BfCache.smethod_2(this.fieldDefinition_0.DeclaringType);
 }
コード例 #16
0
        private void method_1()
        {
            IEnumerable <BfType> arg_23_0 = this.Types;

            if (BfCache.func_0 == null)
            {
                BfCache.func_0 = new Func <BfType, bool>(BfCache.smethod_5);
            }
            BfType bfType = arg_23_0.Where(BfCache.func_0).FirstOrDefault <BfType>();

            if (bfType == null)
            {
                Logger.LogWarning("FindAndSetAllDelegates1", "Could not find System.Delegate Class");
            }
            else
            {
                this.method_2(bfType);
            }
        }
コード例 #17
0
        internal BfType method_12(TypeDefinition typeDefinition_0, BfAssembly bfAssembly_0)
        {
            string text = BfCache.smethod_2(typeDefinition_0);
            BfType result;

            if (!bfAssembly_0.method_4().ContainsKey(text))
            {
                BfType bfType = new BfType(this, typeDefinition_0, bfAssembly_0);
                bfAssembly_0.method_4().Add(BfCache.smethod_2(typeDefinition_0), bfType);
                this.Types.method_1(bfType);
                bfAssembly_0.Namespaces.method_1(bfType.Namespace);
                result = bfType;
            }
            else
            {
                Logger.LogWarning("CreateBfType", "Why the hell is this type already exist " + text);
                result = bfAssembly_0.method_4()[text];
            }
            return(result);
        }
コード例 #18
0
ファイル: BfType.cs プロジェクト: seemantr/Source-Code-Nitriq
 private void method_7()
 {
     if (!this.bool_1)
     {
         this.bool_1 = true;
         IEnumerable <BfType> arg_3D_0 = this.bfCache_0.Types;
         if (BfType.func_0 == null)
         {
             BfType.func_0 = new Func <BfType, bool>(BfType.smethod_0);
         }
         BfType bfType = arg_3D_0.Where(BfType.func_0).First <BfType>();
         if (this.bfType_0 != null && this.bfType_0 != bfType)
         {
             this.bfType_0.method_5();
             this.method_9(this.bfType_0);
             this.method_8(this.bfType_0.TypesUsed);
         }
         foreach (BfType current in ((IEnumerable <BfType>) this.typeCollection_0))
         {
             this.method_9(current);
         }
         foreach (BfField current2 in ((IEnumerable <BfField>) this.fieldCollection_0))
         {
             this.method_8(current2.TypesUsed);
         }
         foreach (BfMethod current3 in ((IEnumerable <BfMethod>) this.methodCollection_0))
         {
             this.method_8(current3.TypesUsed);
         }
         foreach (BfEvent current4 in ((IEnumerable <BfEvent>) this.eventCollection_0))
         {
             this.method_8(current4.TypesUsed);
         }
         this.typeCollection_2.ClearHash();
     }
 }
コード例 #19
0
 private static bool smethod_8(BfType bfType_0)
 {
     return(bfType_0.Name.StartsWith("<PrivateImplementationDetails>"));
 }
コード例 #20
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);
        }
コード例 #21
0
		internal override void vmethod_1(BinaryReader reader)
		{
			base.vmethod_1(reader);
			this.int_0 = reader.ReadInt32();
			this.string_0 = reader.ReadString();
			this.fieldBools_0 = (BfField.FieldBools)reader.ReadByte();
			this.bfType_0 = new BfType
			{
				Id = reader.ReadInt32()
			};
			this.methodCollection_0.method_6(reader);
			this.methodCollection_1.method_6(reader);
		}
コード例 #22
0
		private static BfNamespace smethod_11(BfType bfType_0)
		{
			return bfType_0.Namespace;
		}
コード例 #23
0
		internal override void vmethod_2(BfCache cache)
		{
			base.vmethod_2(cache);
			this.typeCollection_0.method_9(cache);
			this.bfType_0 = ((this.bfType_0.Id == -1) ? null : cache.Types[this.bfType_0.Id]);
			this.methodCollection_0.method_9(cache);
			this.methodCollection_1.method_9(cache);
			this.fieldCollection_0.method_9(cache);
			this.fieldCollection_1.method_9(cache);
		}
コード例 #24
0
		private static bool smethod_8(BfType bfType_0)
		{
			return bfType_0.Name.StartsWith("<PrivateImplementationDetails>");
		}
コード例 #25
0
		private static double smethod_19(BfType bfType_0)
		{
			BfType bfType = (BfType)bfType_0;
			return (double)(bfType.Methods.Count + bfType.Events.Count + bfType.Fields.Count);
		}
コード例 #26
0
		internal override void vmethod_2(BfCache cache)
		{
			base.vmethod_2(cache);
			this.bfType_0 = cache.Types[this.bfType_0.Id];
		}
コード例 #27
0
		internal override void vmethod_1(BinaryReader reader)
		{
			base.vmethod_1(reader);
			this.int_0 = reader.ReadInt32();
			this.eventBools_0 = (BfEvent.EventBools)reader.ReadByte();
			this.bfType_0 = new BfType
			{
				Id = reader.ReadInt32()
			};
		}
コード例 #28
0
		internal BfEvent(BfCache cache, EventDefinition eventDef, BfType type) : base(cache, eventDef, type)
		{
			this.eventDefinition_0 = eventDef;
			this.int_0 = this._cache.method_21();
			this.bfType_0 = this._cache.method_7(this.eventDefinition_0.EventType);
			this._typesUsed.method_1(this.bfType_0);
			this._typesUsed.method_2(this._cache.method_8(this.eventDefinition_0.EventType));
			this._typesUsed.ClearHash();
			this.IsInternal = this.eventDefinition_0.AddMethod.IsAssembly;
			this.IsProtected = this.eventDefinition_0.AddMethod.IsFamily;
			this.IsPrivate = this.eventDefinition_0.AddMethod.IsPrivate;
			this.IsPublic = this.eventDefinition_0.AddMethod.IsPublic;
			this.IsStatic = this.eventDefinition_0.AddMethod.IsStatic;
			this._cache.Events.method_1(this);
		}
コード例 #29
0
		internal BfMethod(BfCache cache, MethodDefinition methodDef, BfType type) : base(cache, methodDef, type)
		{
			this.methodDefinition_0 = methodDef;
			this.int_0 = this._cache.method_18();
			this.string_0 = BfMethod.smethod_0(this.methodDefinition_0);
			if (type.IsInCoreAssembly)
			{
				this.bfType_0 = cache.method_7(methodDef.ReturnType.ReturnType);
				this._typesUsed.method_2(this._cache.method_8(methodDef.ReturnType.ReturnType));
				this._typesUsed.method_1(this.bfType_0);
				this._typesUsed.method_2(this._cache.method_8(this.methodDefinition_0));
				IEnumerator enumerator;
				if (methodDef.Body != null)
				{
					enumerator = methodDef.Body.Variables.GetEnumerator();
					try
					{
						while (enumerator.MoveNext())
						{
							VariableDefinition variableDefinition = (VariableDefinition)enumerator.Current;
							this._typesUsed.method_2(this._cache.method_8(variableDefinition.VariableType));
							this._typesUsed.method_1(this._cache.method_7(variableDefinition.VariableType));
						}
					}
					finally
					{
						IDisposable disposable = enumerator as IDisposable;
						if (disposable != null)
						{
							disposable.Dispose();
						}
					}
				}
				enumerator = methodDef.Parameters.GetEnumerator();
				try
				{
					while (enumerator.MoveNext())
					{
						ParameterDefinition parameterDefinition = (ParameterDefinition)enumerator.Current;
						this._typesUsed.method_2(this._cache.method_8(parameterDefinition.ParameterType));
						this._typesUsed.method_1(this._cache.method_7(parameterDefinition.ParameterType));
						this.typeCollection_0.method_2(this._cache.method_8(parameterDefinition.ParameterType));
						this.typeCollection_0.method_1(this._cache.method_7(parameterDefinition.ParameterType));
					}
				}
				finally
				{
					IDisposable disposable = enumerator as IDisposable;
					if (disposable != null)
					{
						disposable.Dispose();
					}
				}
				this.typeCollection_0.ClearHash();
			}
		}
コード例 #30
0
		private void method_11(BfType bfType_0)
		{
			foreach (BfField current in ((IEnumerable<BfField>)bfType_0.Fields))
			{
				foreach (BfMethod current2 in ((IEnumerable<BfMethod>)current.GotByMethods))
				{
					current2.FieldGets.method_3(current);
				}
				foreach (BfMethod current2 in ((IEnumerable<BfMethod>)current.SetByMethods))
				{
					current2.FieldSets.method_3(current);
				}
				this.Fields.method_3(current);
			}
			foreach (BfMethod current3 in ((IEnumerable<BfMethod>)bfType_0.Methods))
			{
				foreach (BfMethod current2 in ((IEnumerable<BfMethod>)current3.CalledBy))
				{
					current2.Calls.method_3(current3);
				}
				this.Methods.method_3(current3);
			}
			foreach (BfEvent current4 in ((IEnumerable<BfEvent>)bfType_0.Events))
			{
				this.Events.method_3(current4);
			}
		}
コード例 #31
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;
		}
コード例 #32
0
		private static double smethod_18(BfType bfType_0)
		{
			return (double)((BfType)bfType_0).Events.Count;
		}
コード例 #33
0
 internal override void vmethod_2(BfCache cache)
 {
     this._type = ((this._type.Id == -1) ? null : cache.Types[this._type.Id]);
     this._typesUsed.method_9(cache);
 }
コード例 #34
0
		private static double smethod_17(BfType bfType_0)
		{
			return (double)((BfType)bfType_0).Fields.Count;
		}
コード例 #35
0
        internal BfCache(Dictionary <string, AssemblyTuple> nameToAssemblyTuple)
        {
            new HashSet <AssemblyDefinition>();
            this.method_0(nameToAssemblyTuple);
            Logger.LogInfo("Done Loading Assemblies");
            this.assemblyCollection_0.method_2(new HashSet <BfAssembly>(this.dictionary_0.Values));
            int i = 0;

            while (i < this.typeCollection_0.Count)
            {
                BfType bfType = this.typeCollection_0[i];
                if (bfType.Name == "<Module>")
                {
                    i++;
                }
                else
                {
                    bfType.method_4();
                    this.methodCollection_0.method_2(bfType.Methods);
                    this.eventCollection_0.method_2(bfType.Events);
                    this.fieldCollection_0.method_2(bfType.Fields);
                    i++;
                }
            }
            for (i = 0; i < this.typeCollection_0.Count; i++)
            {
                BfType bfType = this.typeCollection_0[i];
                foreach (BfMethod current in ((IEnumerable <BfMethod>)bfType.Methods))
                {
                    current.method_4();
                }
            }
            foreach (BfType bfType in ((IEnumerable <BfType>) this.typeCollection_0))
            {
                BfType bfType;
                bfType.method_5();
            }
            foreach (BfType bfType in ((IEnumerable <BfType>) this.typeCollection_0))
            {
                BfType bfType;
                bfType.method_1();
            }
            foreach (BfAssembly current2 in ((IEnumerable <BfAssembly>) this.assemblyCollection_0))
            {
                current2.method_1();
            }
            this.method_14();
            this.method_1();
            Logger.LogInfo("Done Loading Types");
            this.method_10();
            BaseCollection <BfType> .ClearAllHashes();

            BaseCollection <BfAssembly> .ClearAllHashes();

            BaseCollection <BfMethod> .ClearAllHashes();

            BaseCollection <BfNamespace> .ClearAllHashes();

            BaseCollection <BfField> .ClearAllHashes();

            BaseCollection <BfEvent> .ClearAllHashes();

            this.method_9();
            this.sortedDictionary_0 = null;
            this.dictionary_0       = null;
            this.dictionary_1       = null;
            this.sortedDictionary_1 = null;
            this.dictionary_2       = null;
            GC.Collect();
        }
コード例 #36
0
		private static double smethod_16(BfType bfType_0)
		{
			return (double)((BfType)bfType_0).Methods.Count;
		}
コード例 #37
0
		private static bool smethod_12(BfType bfType_0)
		{
			return !bfType_0.IsInCoreAssembly;
		}
コード例 #38
0
ファイル: BfType.cs プロジェクト: seemantr/Source-Code-Nitriq
 private static bool smethod_0(BfType bfType_1)
 {
     return(bfType_1.FullName == "System.Object");
 }
コード例 #39
0
        internal BfType method_7(TypeReference typeReference_0)
        {
            BfType result;

            if (typeReference_0 == null)
            {
                result = null;
            }
            else
            {
                BfType bfType = null;
                typeReference_0 = BfCache.smethod_3(typeReference_0);
                if (typeReference_0 is GenericParameter)
                {
                    IEnumerable <BfAssembly> arg_53_0 = this.dictionary_0.Values;
                    if (BfCache.func_1 == null)
                    {
                        BfCache.func_1 = new Func <BfAssembly, bool>(BfCache.smethod_6);
                    }
                    BfAssembly bfAssembly = arg_53_0.Where(BfCache.func_1).FirstOrDefault <BfAssembly>();
                    if (bfAssembly == null)
                    {
                        IEnumerable <BfAssembly> arg_8F_0 = this.dictionary_0.Values;
                        if (BfCache.func_2 == null)
                        {
                            BfCache.func_2 = new Func <BfAssembly, bool>(BfCache.smethod_7);
                        }
                        bfAssembly = arg_8F_0.Where(BfCache.func_2).FirstOrDefault <BfAssembly>();
                    }
                    if (bfAssembly.method_4().ContainsKey(typeReference_0.FullName))
                    {
                        bfType = bfAssembly.method_4()[typeReference_0.FullName];
                    }
                    else
                    {
                        bfType = this.method_12(new TypeDefinition(typeReference_0.Name, typeReference_0.Namespace, TypeAttributes.Abstract, null), bfAssembly);
                    }
                    result = bfType;
                }
                else
                {
                    BfAssembly bfAssembly2 = null;
                    try
                    {
                        if (typeReference_0.Scope is AssemblyNameReference)
                        {
                            bfAssembly2 = this.dictionary_0[((AssemblyNameReference)typeReference_0.Scope).FullName];
                        }
                        else if (typeReference_0.Scope is ModuleDefinition)
                        {
                            bfAssembly2 = this.dictionary_0[((ModuleDefinition)typeReference_0.Scope).Assembly.Name.FullName];
                        }
                        else if (typeReference_0.Scope is ModuleReference)
                        {
                            bfAssembly2 = this.dictionary_1[((ModuleReference)typeReference_0.Scope).Name];
                        }
                    }
                    catch (KeyNotFoundException)
                    {
                        throw new Exception("Could not find assembly: " + typeReference_0.Scope.ToString());
                    }
                    bfAssembly2.method_4().TryGetValue(BfCache.smethod_2(typeReference_0), out bfType);
                    if (bfType == null)
                    {
                        foreach (ModuleDefinition moduleDefinition in bfAssembly2.method_3().Modules)
                        {
                            foreach (TypeDefinition typeDefinition in moduleDefinition.Types)
                            {
                                if (typeReference_0.FullName == typeDefinition.FullName)
                                {
                                    bfType = this.method_12(typeDefinition, bfAssembly2);
                                    break;
                                }
                            }
                        }
                    }
                    if (bfType != null)
                    {
                        result = bfType;
                    }
                    else
                    {
                        Logger.LogInfo("can't find: " + typeReference_0.FullName);
                        result = null;
                    }
                }
            }
            return(result);
        }
コード例 #40
0
		private static double smethod_15(BfType bfType_0)
		{
			return (double)((BfType)bfType_0).TypesUsing.Count;
		}
コード例 #41
0
		internal override void vmethod_1(BinaryReader reader)
		{
			this._name = reader.ReadString();
			this._fullName = reader.ReadString();
			this._type = new BfType
			{
				Id = reader.ReadInt32()
			};
			this._typesUsed.method_6(reader);
		}
コード例 #42
0
		internal override void vmethod_2(BfCache cache)
		{
			this._type = ((this._type.Id == -1) ? null : cache.Types[this._type.Id]);
			this._typesUsed.method_9(cache);
		}
コード例 #43
0
 private static bool smethod_5(BfType bfType_0)
 {
     return(bfType_0.FullName == "System.Delegate");
 }
コード例 #44
0
		internal void method_4()
		{
			if (this.bool_0)
			{
				Logger.LogWarning("Type.Populate1", "populate got called more than once");
			}
			else
			{
				this.bool_0 = true;
				if (this.IsInCoreAssembly)
				{
					this.bfType_0 = this.bfCache_0.method_7(this.typeDefinition_0.BaseType);
					if (this.bfType_0 != null && this.bfType_0.FullName != "System.Object")
					{
						this.bfType_0.DerivedTypes.method_1(this);
					}
					foreach (TypeReference typeReference_ in this.typeDefinition_0.Interfaces)
					{
						BfType bfType = this.bfCache_0.method_7(typeReference_);
						this.typeCollection_0.method_1(bfType);
						bfType.DerivedTypes.method_1(this);
					}
					foreach (FieldDefinition fieldDef in this.typeDefinition_0.Fields)
					{
						BfField item = new BfField(this.bfCache_0, fieldDef, this);
						this.fieldCollection_0.method_1(item);
					}
					foreach (MethodDefinition methodDef in this.typeDefinition_0.Methods)
					{
						BfMethod bfMethod = new BfMethod(this.bfCache_0, methodDef, this);
						this.methodCollection_0.method_1(bfMethod);
						this.bfAssembly_0.method_5().Add(bfMethod.UniqueName, bfMethod);
					}
					foreach (MethodDefinition methodDef in this.typeDefinition_0.Constructors)
					{
						BfMethod bfMethod = new BfMethod(this.bfCache_0, methodDef, this);
						this.methodCollection_0.method_1(bfMethod);
						this.bfAssembly_0.method_5().Add(bfMethod.UniqueName, bfMethod);
					}
					foreach (EventDefinition eventDef in this.typeDefinition_0.Events)
					{
						BfEvent item2 = new BfEvent(this.bfCache_0, eventDef, this);
						this.eventCollection_0.method_1(item2);
					}
					this.int_1 = this.typeDefinition_0.GenericParameters.Count;
					this.method_6();
					this.typeCollection_0.ClearHash();
					this.fieldCollection_0.ClearHash();
					this.methodCollection_0.ClearHash();
					this.eventCollection_0.ClearHash();
				}
			}
		}
コード例 #45
0
		private void method_2(BfType bfType_0)
		{
			bfType_0.IsDelegate = true;
			foreach (BfType current in ((IEnumerable<BfType>)bfType_0.DerivedTypes))
			{
				this.method_2(current);
			}
		}
コード例 #46
0
		private void method_9(BfType bfType_1)
		{
			if (bfType_1 != null)
			{
				if (this.bfAssembly_0.IsCoreAssembly)
				{
					this.typeCollection_2.method_1(bfType_1);
				}
				bfType_1.TypesUsing.method_1(this);
			}
		}
コード例 #47
0
		internal BfType method_12(TypeDefinition typeDefinition_0, BfAssembly bfAssembly_0)
		{
			string text = BfCache.smethod_2(typeDefinition_0);
			BfType result;
			if (!bfAssembly_0.method_4().ContainsKey(text))
			{
				BfType bfType = new BfType(this, typeDefinition_0, bfAssembly_0);
				bfAssembly_0.method_4().Add(BfCache.smethod_2(typeDefinition_0), bfType);
				this.Types.method_1(bfType);
				bfAssembly_0.Namespaces.method_1(bfType.Namespace);
				result = bfType;
			}
			else
			{
				Logger.LogWarning("CreateBfType", "Why the hell is this type already exist " + text);
				result = bfAssembly_0.method_4()[text];
			}
			return result;
		}
コード例 #48
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()
			};
		}
コード例 #49
0
		private static bool smethod_5(BfType bfType_0)
		{
			return bfType_0.FullName == "System.Delegate";
		}
コード例 #50
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]);
		}
コード例 #51
0
		internal BfField(BfCache cache, FieldDefinition fieldDef, BfType type) : base(cache, fieldDef, type)
		{
			this.fieldDefinition_0 = fieldDef;
			this.int_0 = cache.method_20();
			this.IsInternal = this.fieldDefinition_0.IsAssembly;
			this.IsProtected = this.fieldDefinition_0.IsFamily;
			this.IsProtectedAndInternal = this.fieldDefinition_0.IsFamilyAndAssembly;
			this.IsProtectedOrInternal = this.fieldDefinition_0.IsFamilyOrAssembly;
			this.IsPrivate = this.fieldDefinition_0.IsPrivate;
			this.IsPublic = this.fieldDefinition_0.IsPublic;
			this.IsStatic = this.fieldDefinition_0.IsStatic;
			this.IsConstant = this.fieldDefinition_0.HasConstant;
			this.bfType_0 = this._cache.method_7(this.fieldDefinition_0.FieldType);
			this._typesUsed.method_1(this.bfType_0);
			this._typesUsed.method_2(this._cache.method_8(this.fieldDefinition_0.FieldType));
			this._typesUsed.ClearHash();
			this.string_0 = BfCache.smethod_2(this.fieldDefinition_0.DeclaringType);
		}
コード例 #52
0
		private static bool smethod_0(BfType bfType_1)
		{
			return bfType_1.FullName == "System.Object";
		}
コード例 #53
0
 internal override void vmethod_2(BfCache cache)
 {
     base.vmethod_2(cache);
     this.bfType_0 = cache.Types[this.bfType_0.Id];
 }
コード例 #54
0
		internal override void vmethod_1(BinaryReader reader)
		{
			base.vmethod_1(reader);
			this.int_0 = reader.ReadInt32();
			this.int_1 = reader.ReadInt32();
			this.int_2 = reader.ReadInt32();
			this.int_3 = reader.ReadInt32();
			this.int_4 = reader.ReadInt32();
			this.int_5 = reader.ReadInt32();
			this.int_6 = reader.ReadInt32();
			this.int_7 = reader.ReadInt32();
			this.int_8 = reader.ReadInt32();
			this.int_9 = reader.ReadInt32();
			this.methodBools_0 = (BfMethod.MethodBools)reader.ReadInt32();
			this.typeCollection_0.method_6(reader);
			this.bfType_0 = new BfType
			{
				Id = reader.ReadInt32()
			};
			this.methodCollection_0.method_6(reader);
			this.methodCollection_1.method_6(reader);
			this.fieldCollection_0.method_6(reader);
			this.fieldCollection_1.method_6(reader);
		}