예제 #1
0
		private MethodDefinition DoGetBase(MethodDefinition derived)
		{
			MethodDefinition parent = null;
			
			TypeReference tr = derived.GetDeclaredIn(Cache);
			if (tr != null)
			{
				Log.DebugLine(this, "declared in {0}", tr);				
				TypeDefinition type = Cache.FindType(tr);
				if (type != null)
				{
					parent = type.Methods.GetMethod(derived.Name, derived.Parameters);
				}
			}
			
			return parent;
		}
예제 #2
0
		public void VisitMethod(MethodDefinition method)
		{
			Log.DebugLine(this, "checking {0}", method);		
			
			if (method.Name == "GetObjectData")
			{
				TypeReference type = method.GetDeclaredIn(Cache);
				if (type != null && type.FullName == "System.Runtime.Serialization.ISerializable")
				{
					Log.DebugLine(this, "   it's declared in ISerializable");		

					if (!DoIsSecured(method))
					{
						Reporter.MethodFailed(method, CheckID, 0, string.Empty);
					}
				}
			}
		}