CM3D2.MaidFiddler.Sybaris.Patcher.MaidFiddlerPatcher.SetCustomPatchedAttribute C# (CSharp) Method

SetCustomPatchedAttribute() private static method

private static SetCustomPatchedAttribute ( AssemblyDefinition ass ) : void
ass Mono.Cecil.AssemblyDefinition
return void
        private static void SetCustomPatchedAttribute(AssemblyDefinition ass)
        {
            CustomAttribute attr =
            new CustomAttribute(
            ass.MainModule.Import(typeof (MaidFiddlerPatchedAttribute).GetConstructor(new[] {typeof (uint)})));
            attr.ConstructorArguments.Add(
            new CustomAttributeArgument(ass.MainModule.Import(typeof (uint)), PATCHER_VERSION));

            CustomAttribute attr2 =
            new CustomAttribute(
            ass.MainModule.Import(typeof (MaidFiddlerPatcherAttribute).GetConstructor(new[] {typeof (uint)})));
            attr2.ConstructorArguments.Add(
            new CustomAttributeArgument(ass.MainModule.Import(typeof (uint)), (uint) PatcherType.Sybaris));

            ass.MainModule.GetType("Maid").CustomAttributes.Add(attr);
            ass.MainModule.GetType("Maid").CustomAttributes.Add(attr2);
        }
    }