示例#1
0
 public override WriterContext GetWriterContext(IMemberDefinition member, ILanguage language)
 {
     if (member as TypeDefinition == null || member != Utilities.GetOuterMostDeclaringType(member))
     {
         V_1 = this.GetDecompiledType(member, language);
         V_0 = this.GetTypeContext(V_1, language);
     }
     else
     {
         V_7 = member as TypeDefinition;
         V_8 = this.GetNestedDecompiledTypes(V_7, language);
         V_0 = this.GetTypeContext(V_7, language, V_8);
         this.AddTypeContextsToCache(V_8, V_7, language);
         if (!V_8.TryGetValue(V_7.get_FullName(), out V_1))
         {
             throw new Exception("Decompiled type not found in decompiled types cache.");
         }
     }
     V_2 = new TypeSpecificContext(V_0.get_CurrentType(), V_0.get_MethodDefinitionToNameMap(), V_0.get_BackingFieldToNameMap(), V_0.get_UsedNamespaces(), new HashSet <string>(), V_0.get_AssignmentData(), V_0.get_AutoImplementedProperties(), V_0.get_AutoImplementedEvents(), V_0.get_ExplicitlyImplementedMembers(), V_0.get_ExceptionWhileDecompiling(), V_0.get_GeneratedFilterMethods(), V_0.get_GeneratedMethodDefinitionToNameMap());
     if (V_2.get_GeneratedFilterMethods().get_Count() > 0)
     {
         this.AddGeneratedFilterMethodsToDecompiledType(V_1, V_2, language);
     }
     V_3 = new Dictionary <string, MethodSpecificContext>();
     V_4 = new Dictionary <string, Statement>();
     V_9 = V_1.get_DecompiledMembers().GetEnumerator();
     try
     {
         while (V_9.MoveNext())
         {
             V_10 = V_9.get_Current();
             V_3.Add(V_10.get_Key(), V_10.get_Value().get_Context());
             V_4.Add(V_10.get_Key(), V_10.get_Value().get_Statement());
         }
     }
     finally
     {
         ((IDisposable)V_9).Dispose();
     }
     V_5             = Utilities.GetDeclaringTypeOrSelf(member);
     stackVariable66 = this.GetAssemblyContext(V_5.get_Module().get_Assembly(), language);
     V_6             = this.GetModuleContext(V_5.get_Module(), language);
     return(new WriterContext(stackVariable66, V_6, V_2, V_3, V_4));
 }