public Modification(TypeModification newTypeModif, String newNameUser, int newIdFiche, String newText, DateTime newDateModif, String newValue) { modification = newTypeModif; nameUser = newNameUser; idFiche = newIdFiche; text = newText; dateModif = newDateModif; valueModif = newValue; }
public void TestDependencyMissingNestedType() { PatchInstaller installer = new PatchInstaller(new MockModuleSource(module)); StandardPatch patch = new StandardPatch("TestPatch"); TypeModification type = patch.Module(module.Name, ModificationKind.FailIfMissing, true).Type(ReadOnlyNamespace, NormalClass, ModificationKind.FailIfMissing); type.Attributes = TypeAttributes.BeforeFieldInit; type.NestedType(MissingMember, ModificationKind.FailIfMissing); installer.Add(patch); installer.Install(); }
public void TestDependencyMissingProperty() { PatchInstaller installer = new PatchInstaller(new MockModuleSource(module)); StandardPatch patch = new StandardPatch("TestPatch"); TypeModification type = patch.Module(module.Name, ModificationKind.FailIfMissing, true).Type(ReadOnlyNamespace, NormalClass, ModificationKind.FailIfMissing); type.Attributes = TypeAttributes.BeforeFieldInit; type.Property(MissingMember, new PropertySignature(true, new CorLibTypeSignature(new TypeReference(patch.Module("System.Runtime", ModificationKind.FailIfMissing, true), "System", "String", new ModuleReference("System.Runtime")), ElementType.String)), ModificationKind.FailIfMissing); installer.Add(patch); installer.Install(); }
public void TestDependencyMissingMethod() { PatchInstaller installer = new PatchInstaller(new MockModuleSource(module)); StandardPatch patch = new StandardPatch("TestPatch"); TypeModification type = patch.Module(module.Name, ModificationKind.FailIfMissing, true).Type(ReadOnlyNamespace, NormalClass, ModificationKind.FailIfMissing); type.Attributes = TypeAttributes.BeforeFieldInit; type.Method(MissingMember, new MethodSignature(CallingConvention.HasThis, 0u, new CorLibTypeSignature(new TypeReference(patch.Module("System.Runtime", ModificationKind.FailIfMissing, true), "System", "Void", new ModuleReference("System.Runtime")), ElementType.Void)), ModificationKind.FailIfMissing).Attributes = MethodAttributes.HideBySig; installer.Add(patch); installer.Install(); }
public void TestDependencyExistingProperty() { PatchInstaller installer = new PatchInstaller(new MockModuleSource(module)); StandardPatch patch = new StandardPatch("TestPatch"); TypeModification type = patch.Module(module.Name, ModificationKind.FailIfMissing, true).Type(ReadOnlyNamespace, NormalClass, ModificationKind.FailIfMissing); type.Attributes = TypeAttributes.BeforeFieldInit; MethodModification propertyGet = type.Method("get_" + StringProperty, new MethodSignature(CallingConvention.HasThis, 0u, new CorLibTypeSignature(new TypeReference(patch.Module("System.Runtime", ModificationKind.FailIfMissing, true), "System", "String", new ModuleReference("System.Runtime")), ElementType.String)), ModificationKind.FailIfMissing); propertyGet.Attributes = MethodAttributes.HideBySig | MethodAttributes.SpecialName; type.Property(StringProperty, new PropertySignature(true, new CorLibTypeSignature(new TypeReference(patch.Module("System.Runtime", ModificationKind.FailIfMissing, true), "System", "String", new ModuleReference("System.Runtime")), ElementType.String)), ModificationKind.FailIfMissing).Get(propertyGet); installer.Add(patch); installer.Install(); }
internal EventModification(TypeModification declaringType, UTF8String name, ITypeReference <ITypeDefOrRef> type, ModificationKind kind, bool readOnly) : base(declaringType, name, kind, readOnly) => Type = type;
internal PropertyModification(TypeModification declaringType, UTF8String name, PropertySignature signature, ModificationKind kind, bool readOnly) : base(declaringType, name, kind, readOnly) => Signature = signature;
private protected AccessibleModification(TypeModification declaringType, UTF8String name, ModificationKind kind, bool readOnly) : base(declaringType, name, kind, readOnly) { }
private protected MemberModification(TypeModification declaringType, UTF8String name, ModificationKind kind, bool readOnly) : base(kind, readOnly) { DeclaringType = declaringType; Name = name; }
public TypeModification _modifOnSquare; //not on square because typemodif is associate to a unit, not a square public ModifiedSquare(TypeModification typeModif, SquareBehavior squareToAdd) //Constructor { _square = squareToAdd; _modifOnSquare = typeModif; _square.ChangeState(typeModif); }