本文整理汇总了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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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);
}
示例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);
}
示例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);
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}