當前位置: 首頁>>代碼示例>>C#>>正文


C# ModuleDefinition.AllNestedTypes方法代碼示例

本文整理匯總了C#中Mono.Cecil.ModuleDefinition.AllNestedTypes方法的典型用法代碼示例。如果您正苦於以下問題:C# ModuleDefinition.AllNestedTypes方法的具體用法?C# ModuleDefinition.AllNestedTypes怎麽用?C# ModuleDefinition.AllNestedTypes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Mono.Cecil.ModuleDefinition的用法示例。


在下文中一共展示了ModuleDefinition.AllNestedTypes方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: PatchModule

 public static void PatchModule(ModuleDefinition baseModule)
 {
     var type = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.VersusMatchResults");
     var method = type.Methods.Single(m => m.FullName == "System.Void TowerFall.VersusMatchResults::.ctor(TowerFall.Session,TowerFall.VersusRoundResults)");
     var instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeMethod(i));
 }
開發者ID:Jonesey13,項目名稱:TF-8-Player,代碼行數:7,代碼來源:CleanMyVersusMatchResults.cs

示例2: PatchModule

 public static void PatchModule(ModuleDefinition baseModule)
 {
     var type = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.TeamSelectOverlay");
     var method = type.Methods.Single(m => m.FullName == "System.Void TowerFall.TeamSelectOverlay::.ctor(TowerFall.CustomMapButton)");
     var instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeFoursToEights(i));
 }
開發者ID:Jonesey13,項目名稱:TF-8-Player,代碼行數:7,代碼來源:TeamSelectOverlay.cs

示例3: PatchModule

 public static void PatchModule(ModuleDefinition baseModule)
 {
     var type = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.PlayerInput");
     var method = type.Methods.Single(m => m.FullName == "System.Void TowerFall.PlayerInput::AssignInputs()");
     var instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeFoursToEights(i));
     instructions.ForEach(i => ChangeThreesToSevens(i));
 }
開發者ID:Jonesey13,項目名稱:TF-8-Player,代碼行數:8,代碼來源:PlayerInput.cs

示例4: PatchModule

 public static void PatchModule(ModuleDefinition baseModule)
 {
     var type = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.AwardInfo");
     var method = type.Methods.Single(m => m.FullName == "Monocle.Sprite`1<System.Int32> TowerFall.AwardInfo::GetSprite(System.Boolean)");
     var instructions = method.Body.Instructions.ToList();
     var proc = method.Body.GetILProcessor();
     instructions.ForEach(i => GetMethod(i, proc, baseModule));
 }
開發者ID:Jonesey13,項目名稱:TF-8-Player,代碼行數:8,代碼來源:AwardInfo.cs

示例5: PatchModule

 public static void PatchModule(ModuleDefinition baseModule)
 {
     var type = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.Session");
     var method = type.Methods.Single(m => m.FullName == "System.Void TowerFall.Session::.ctor(TowerFall.MatchSettings)");
     var instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeFoursToEights(i));
     method = type.Methods.Single(m => m.FullName == "System.Void TowerFall.Session::EndRound()");
     instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeFoursToEights(i));
 }
開發者ID:Jonesey13,項目名稱:TF-8-Player,代碼行數:10,代碼來源:Session.cs

示例6: PatchModule

 public static void PatchModule(ModuleDefinition baseModule)
 {
     var type = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.VersusRoundResults");
     var method = type.Methods.Single(m => m.FullName == "System.Collections.IEnumerator TowerFall.VersusRoundResults::Sequence(System.Collections.Generic.List`1<TowerFall.EventLog>)");
     var instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeThreesToSevens(i));
     var subType = type.NestedTypes.Single(st => st.FullName.Contains("TowerFall.VersusRoundResults/<Sequence>"));
     method = subType.Methods.Single(m => m.FullName.Contains("::MoveNext()"));
     instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeThreeToSeven(i));
 }
開發者ID:Jonesey13,項目名稱:TF-8-Player,代碼行數:11,代碼來源:VersusRoundResults.cs

示例7: CleanModule

 public static void CleanModule(ModuleDefinition baseModule)
 {
     var type = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.VersusPlayerMatchResults");
     var method = type.Methods.Single(m => m.FullName == "System.Void TowerFall.VersusPlayerMatchResults::.ctor(TowerFall.Session,TowerFall.VersusMatchResults,System.Int32,Microsoft.Xna.Framework.Vector2,Microsoft.Xna.Framework.Vector2,System.Collections.Generic.List`1<TowerFall.AwardInfo>)");
     var firstInstruction = method.Body.Instructions.First();
     var secondInstruction = method.Body.Instructions[1];
     var lastInstruction = method.Body.Instructions.Last();
     method.Body.Instructions.Clear();
     method.Body.Instructions.Add(firstInstruction);
     method.Body.Instructions.Add(secondInstruction);
     method.Body.Instructions.Add(lastInstruction);
 }
開發者ID:Jonesey13,項目名稱:TF-8-Player,代碼行數:12,代碼來源:CleanMyVersusPlayerMatchResults.cs

示例8: CleanModule

 public static void CleanModule(ModuleDefinition baseModule)
 {
     var type = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.VersusMatchResults");
     var method = type.Methods.Single(m => m.FullName == "System.Void TowerFall.VersusMatchResults::.ctor(TowerFall.Session,TowerFall.VersusRoundResults)");
     var instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => GetMethod(i));
     var firstInstruction = method.Body.Instructions.First();
     var secondInstruction = method.Body.Instructions[1];
     var lastInstruction = method.Body.Instructions.Last();
     method.Body.Instructions.Clear();
     method.Body.Instructions.Add(firstInstruction);
     method.Body.Instructions.Add(secondInstruction);
     method.Body.Instructions.Add(lastInstruction);
 }
開發者ID:Jonesey13,項目名稱:TF-8-Player,代碼行數:14,代碼來源:CleanMyVersusMatchResults.cs

示例9: CleanModule

 public static void CleanModule(ModuleDefinition baseModule)
 {
     var type = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.VariantPerPlayer");
     var method = type.Methods.Single(m => m.FullName == "System.Void TowerFall.VariantPerPlayer::.ctor(TowerFall.VariantToggle,Microsoft.Xna.Framework.Vector2)");
     var firstInstruction = method.Body.Instructions.First();
     var secondInstruction = method.Body.Instructions[1];
     var thirdInstruction = method.Body.Instructions[2];
     var lastInstruction = method.Body.Instructions.Last();
     method.Body.Instructions.Clear();
     method.Body.Instructions.Add(firstInstruction);
     method.Body.Instructions.Add(secondInstruction);
     method.Body.Instructions.Add(thirdInstruction);
     method.Body.Instructions.Add(lastInstruction);
 }
開發者ID:Jonesey13,項目名稱:TF-8-Player,代碼行數:14,代碼來源:CleanVariantPerPlayer.cs

示例10: PatchModule

 public static void PatchModule(ModuleDefinition baseModule)
 {
     var type = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.TFCommands");
     Mono.Cecil.MethodDefinition method;
     try {
         method = type.Methods.Single(m => m.FullName.Contains("System.Void TowerFall.TFCommands::<Init>b__4(System.String[])"));
     }
     catch (System.InvalidOperationException)
     {
         var subType = type.NestedTypes.Single(st => st.FullName == "TowerFall.TFCommands/<>c");
         method = subType.Methods.Single(m => m.FullName.Contains("System.Void TowerFall.TFCommands/<>c::<Init>b__0_4(System.String[])"));
     }
     var instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeFoursToEights(i));
 }
開發者ID:Jonesey13,項目名稱:TF-8-Player,代碼行數:15,代碼來源:TFCommands.cs

示例11: PatchModule

 public static void PatchModule(ModuleDefinition baseModule)
 {
     var type = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.RoundLogic");
     var method = type.Methods.Single(m => m.FullName == "System.Void TowerFall.RoundLogic::.ctor(TowerFall.Session,System.Boolean)");
     var instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeFoursToEights(i));
     method = type.Methods.Single(m => m.FullName == "System.Void TowerFall.RoundLogic::FinalKillTeams(TowerFall.PlayerCorpse,TowerFall.Allegiance)");
     instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeFoursToEights(i));
     method = type.Methods.Single(m => m.FullName == "System.Int32 TowerFall.RoundLogic::SpawnPlayersFFA()");
     instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeFoursToEights(i));
     method = type.Methods.Single(m => m.FullName == "System.Void TowerFall.RoundLogic::SpawnPlayersTeams()");
     instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeFoursToEights(i));
 }
開發者ID:Jonesey13,項目名稱:TF-8-Player,代碼行數:16,代碼來源:RoundLogic.cs

示例12: PatchModule

 public static void PatchModule(ModuleDefinition baseModule)
 {
     var type = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.TFGame");
     var method = type.Methods.Single(m => m.FullName == "System.Void TowerFall.TFGame::.cctor()");
     var instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeFoursToEights(i));
     method = type.Methods.Single(m => m.FullName == "System.Boolean TowerFall.TFGame::CharacterTaken(System.Int32)");
     instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeFoursToEights(i));
     method = type.Methods.Single(m => m.FullName == "System.Void TowerFall.TFGame::Initialize()");
     instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeFoursToEights(i));
     method = type.Methods.Single(m => m.FullName == "System.Void TowerFall.TFGame::Load()");
     instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeFoursToEights(i));
     method = type.Methods.Single(m => m.FullName == "System.Int32 TowerFall.TFGame::get_FirstPlayer()");
     instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeFoursToEights(i));
 }
開發者ID:Jonesey13,項目名稱:TF-8-Player,代碼行數:19,代碼來源:TFGame.cs

示例13: PatchModule

 public static void PatchModule(ModuleDefinition baseModule)
 {
     var type = baseModule.AllNestedTypes().Single(t => t.FullName == "TowerFall.Variant");
     var method = type.Methods.Single(m => m.FullName == "System.Void TowerFall.Variant::.ctor(Monocle.Subtexture,System.String,System.String,TowerFall.Pickups[],System.Boolean,System.String,System.Nullable`1<TowerFall.UnlockData/Unlocks>,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Int32)");
     var instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeFoursToEights(i));
     method = type.Methods.Single(m => m.FullName == "System.Void TowerFall.Variant::Clean(System.Int32)");
     instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeFoursToEights(i));
     method = type.Methods.Single(m => m.FullName == "System.Boolean TowerFall.Variant::get_AllTrue()");
     instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeFoursToEights(i));
     method = type.Methods.Single(m => m.FullName == "System.Int32 TowerFall.Variant::get_Players()");
     instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeFoursToEights(i));
     method = type.Methods.Single(m => m.FullName == "System.Void TowerFall.Variant::set_Value(System.Boolean)");
     instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeFoursToEights(i));
     method = type.Methods.Single(m => m.FullName == "System.Boolean TowerFall.Variant::get_Value()");
     instructions = method.Body.Instructions.ToList();
     instructions.ForEach(i => ChangeFoursToEights(i));
 }
開發者ID:Jonesey13,項目名稱:TF-8-Player,代碼行數:22,代碼來源:Variant.cs


注:本文中的Mono.Cecil.ModuleDefinition.AllNestedTypes方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。