public void VisitBegin(BeginType begin) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "{0}", begin.Type); m_needsCheck = begin.Type.ExternallyVisible(Cache); }
public void VisitBegin(BeginType begin) { DBC.Assert(!m_checkingCalls, "VisitBegin was called after we started visiting calls"); // If the class is internal, if (begin.Type.IsNotPublic || begin.Type.IsNestedAssembly || begin.Type.IsNestedFamilyAndAssembly) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "{0}", begin.Type); // and it directly implements one or more public interfaces, int count = DoCountInterfaces(begin.Type); if (count > 0) { // then build a list of all the non-private/protected methods // in the class that were not declared in an interface. foreach (MethodDefinition method in begin.Type.Methods) { if (!method.IsPrivate && !method.IsFamily) { if (!method.IsConstructor) { TypeReference t = method.GetDeclaredIn(Cache); if (t == begin.Type) { Log.DebugLine(this, " adding {0}", method.Name); m_candidates.Add(method, new Info(begin.Type)); } } } } } } }
public void VisitBegin(BeginType begin) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "checking {0}", begin.Type); m_details = string.Empty; }
public void VisitBegin(BeginType type) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "{0}", type.Type); m_needsCheck = type.Type.IsEnum && type.Type.CustomAttributes.Has("FlagsAttribute"); m_values.Clear(); }
public void VisitBegin(BeginType begin) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "{0}", begin.Type); m_hasFinalizer = false; m_hasIntPtrField = false; }
public void VisitBegin(BeginType type) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "{0}", type.Type); m_needsCheck = type.Type.IsEnum; m_foundZero = false; }
public void VisitBegin(BeginType begin) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "checking {0}", begin.Type); m_names = string.Empty; m_needsCheck = begin.Type.ExternallyVisible(Cache); }
public void VisitBegin(BeginType begin) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "checking {0}", begin.Type); m_needsCheck = !begin.Type.IsEnum && begin.Type.ExternallyVisible(Cache); m_details = string.Empty; }
public void VisitBegin(BeginType begin) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "{0}", begin.Type); m_disposable = begin.Type.TypeOrBaseImplements("System.IDisposable", Cache); m_hasDispose = false; }
public void VisitBegin(BeginType begin) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "{0}", begin.Type); m_needsCheck = !begin.Type.IsEnum && DoIsVisible(begin.Type); m_visible.Clear(); }
public void VisitBegin(BeginType begin) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "{0}", m_type); m_type = begin.Type; m_failed = false; }
public void VisitBegin(BeginType begin) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "checking {0}", begin.Type); m_type = begin.Type; m_candidates.Clear(); }
public void VisitBegin(BeginType begin) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "{0}", begin.Type); m_type = begin.Type; m_needsCheck = false; }
public void VisitBegin(BeginType begin) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "{0}", begin.Type); m_type = begin.Type; m_field = null; }
public void VisitBegin(BeginType begin) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "{0}", begin.Type); m_hasAdd = false; m_hasMinus = false; m_hasEquals = false; }
public void VisitBegin(BeginType begin) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "{0}", begin.Type); m_type = begin.Type; m_name = null; m_needsCheck = m_type.IsSealed; }
public void VisitBegin(BeginType begin) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "{0}", begin.Type); m_type = begin.Type; m_ownsField = false; m_disposable = begin.Type.TypeOrBaseImplements("System.IDisposable", Cache); m_details = string.Empty; }
public void VisitBegin(BeginType begin) { m_isAbstract = begin.Type.IsAbstract; m_hasPublicCtor = false; if (m_isAbstract) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "{0}", begin.Type); } }
public void VisitBegin(BeginType begin) { m_needsCheck = begin.Type.ExternallyVisible(Cache); m_badFields.Clear(); if (m_needsCheck) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "{0}", begin.Type); } }
public void VisitBegin(BeginType begin) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "{0}", begin.Type); m_needsCheck = !begin.Type.IsInterface && begin.Type.TypeImplements("System.IComparable"); if (m_needsCheck) { m_foundCompare = false; m_foundEquals = false; } }
public void VisitBegin(BeginType arg) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "checking {0}", arg.Type); m_details = string.Empty; m_type = arg.Type; m_needsCheck = false; // if (!m_type.FullName.Contains("PrivateImplementationDetails")) if (!m_type.Name.StartsWith("yy") && !m_type.IsCompilerGenerated()) m_needsCheck = true; }
public void VisitBegin(BeginType begin) { MethodDefinition finalizer = begin.Type.Methods.GetMethod("Finalize", Type.EmptyTypes); m_hasFinalizer = finalizer != null; m_hasIntPtr = false; m_hasKeepAlive = false; if (m_hasFinalizer) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "checking {0}", begin.Type); } }
public void VisitBegin(BeginType begin) { m_needsCheck = begin.Type.IsSubclassOf("System.Exception", Cache) && begin.Type.ExternallyVisible(Cache); if (m_needsCheck) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "{0}", begin.Type); m_foundInner = false; m_foundSerialized = false; } }
public void VisitBegin(BeginType begin) { m_needsCheck = false; m_type = begin.Type; m_details = string.Empty; if (m_type.ExternallyVisible(Cache)) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "{0}", m_type); m_needsCheck = true; } }
public void VisitBegin(BeginType begin) { m_needsCheck = begin.Type.IsSubclassOf("System.Attribute", Cache); Log.DebugLine(this, "{0}", begin.Type); if (m_needsCheck) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "{0}", begin.Type); m_required.Clear(); m_optional.Clear(); m_getters.Clear(); m_setters.Clear(); } }
public void VisitBegin(BeginType begin) { m_needsCheck = false; m_hasBadField = false; m_details = string.Empty; if ((begin.Type.Attributes & TypeAttributes.Serializable) == TypeAttributes.Serializable) { if (!begin.Type.TypeOrBaseImplements("System.Runtime.Serialization.ISerializable", Cache)) { m_needsCheck = true; Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "checking {0}", begin.Type); } } }
public void VisitBegin(BeginType begin) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "{0}", begin.Type); foreach (MethodDefinition method in begin.Type.Methods) { int index = DoGetUriArg(method); if (index >= 0) { MethodDefinition str = DoFindString(begin.Type, method, index); if (str != null) { Log.DebugLine(this, "{0} is a candidate (index = {1})", method.Name, index); m_table.Add(str, new Entry(method)); } } } }
public void VisitBegin(BeginType begin) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "checking {0}", begin.Type); m_needsCheck = !begin.Type.IsCompilerGenerated(); if (m_needsCheck) { m_refs = new List<TypeReference>(); TypeReference super = begin.Type.BaseType; while (super != null && super.FullName != "System.Object") { DoAdd(super); TypeDefinition t = Cache.FindType(super); super = t != null ? t.BaseType : null; } } }
public void VisitBegin(BeginType begin) { m_needsCheck = false; m_correct = true; m_type = begin.Type; if (begin.Type.TypeOrBaseImplements("System.Runtime.Serialization.ISerializable", Cache)) { if (!begin.Type.IsInterface) { if (!begin.Type.IsSubclassOf("System.Delegate", Cache) && !begin.Type.IsSubclassOf("System.MulticastDelegate", Cache)) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "checking {0}", begin.Type); m_needsCheck = true; } } } }
internal void Dispatch(TypeDefinition type) { DoSetExcluding(type.FullName); BeginType begin = new BeginType(); begin.Type = type; DoVisit(begin); DoVisit(type); foreach (FieldDefinition field in type.Fields) { DoVisit(field); } foreach (EventDefinition evt in type.Events) { DoVisit(evt); } foreach (PropertyDefinition prop in type.Properties) { DoVisit(prop); } foreach (MethodDefinition method in type.Constructors) { DoVisit(method); } foreach (MethodDefinition method in type.Methods) { DoVisit(method); } EndType end = new EndType(); end.Type = type; DoVisit(end); }
public void VisitBegin(BeginType begin) { m_needsCheck = false; m_hasCtor = false; if (!begin.Type.IsSubclassOf("System.Exception", Cache)) // if it's an exception let ExceptionConstructorsRule take care of it { if (begin.Type.TypeOrBaseImplements("System.Runtime.Serialization.ISerializable", Cache)) { if (!begin.Type.IsInterface) { if (!begin.Type.IsSubclassOf("System.Delegate", Cache) && !begin.Type.IsSubclassOf("System.MulticastDelegate", Cache)) { Log.DebugLine(this, "-----------------------------------"); Log.DebugLine(this, "checking {0}", begin.Type); m_needsCheck = true; } } } } }