コード例 #1
0
ファイル: Authority.cs プロジェクト: magicmoux/Puresharp
 public Authority(TypeDefinition type)
 {
     this.m_Type = type.Type("<Puresharp>", TypeAttributes.Class | TypeAttributes.NestedPrivate | TypeAttributes.Sealed | TypeAttributes.Abstract);
     foreach (var _parameter in type.GenericParameters)
     {
         this.m_Type.GenericParameters.Add(_parameter.Copy(this.m_Type));
     }
     foreach (var _method in type.Methods.ToArray())
     {
         if (Bypass.Match(_method))
         {
             continue;
         }
         Machine.Manage(_method);
     }
     this.m_Authentic    = new Authentic(this.m_Type);
     this.m_Intermediate = new Intermediate(this.m_Type, this.m_Authentic);
     foreach (var _method in type.Methods.ToArray())
     {
         if (Bypass.Match(_method))
         {
             continue;
         }
         this.Manage(type, _method);
     }
 }
コード例 #2
0
 public Intermediate(TypeDefinition type, Authentic authentic)
 {
     this.m_Type = type.Type("<Intermediate>", TypeAttributes.NestedPublic | TypeAttributes.Class | TypeAttributes.Sealed | TypeAttributes.Abstract);
     foreach (var _parameter in type.GenericParameters)
     {
         this.m_Type.GenericParameters.Add(_parameter.Copy(this.m_Type));
     }
     this.m_Authentic  = authentic;
     this.m_Dictionary = new Dictionary <MethodDefinition, FieldDefinition>();
     foreach (var _method in type.DeclaringType.Methods.ToArray())
     {
         if (Bypass.Match(_method))
         {
             continue;
         }
         this.m_Dictionary.Add(_method, this.Manage(_method));
     }
 }