internal void Weave(TypeDefinition typeDefinition) { var type = typeDefinition.TryGetSystemType(); if (type == null) { ModuleWeaver.LogInfo($"Type {typeDefinition.FullName} will not be weaved because it was not possible to load its corresponding System.Type"); return; } if (type.IsInterface) { ModuleWeaver.LogInfo($"Type {typeDefinition.FullName} will not be weaved because it is an interface"); return; } if (WeavedTypes.ContainsKey(type)) { // if the type we're trying to weave was already weaved we'll skip weaving it // all aspects are applied the first time the type is weaved, there's no need to weave it more than once return; } else { // mark this method so that it won't be weaved again WeavedTypes.Add(type, true); } ApplyImplementInterfaceAspects(typeDefinition, type); }
internal override void Weave(TypeDefinition typeDefinition) { var type = typeDefinition.TryGetSystemType(); if (type == null) { ModuleWeaver.LogInfo($"Type {typeDefinition.FullName} will not be weaved because it was not possible to load its corresponding System.Type"); return; } if (type.IsInterface) { ModuleWeaver.LogInfo($"Type {typeDefinition.FullName} will not be weaved because it is an interface"); return; } WeaveTypeProperties(typeDefinition); }