private void WriteMethodDefinition(IMethodDefinition method) { if (method.IsPropertyOrEventAccessor()) { return; } if (method.IsDestructor()) { WriteDestructor(method); return; } string name = method.GetMethodName(); WriteMethodPseudoCustomAttributes(method); WriteAttributes(method.Attributes); WriteAttributes(method.SecurityAttributes); if (!method.ContainingTypeDefinition.IsInterface) { if (!method.IsExplicitInterfaceMethod()) { WriteVisibility(method.Visibility); } WriteMethodModifiers(method); } WriteInterfaceMethodModifiers(method); WriteMethodDefinitionSignature(method, name); WriteMethodBody(method); }
private void WriteMethodDefinition(IMethodDefinition method) { if (method.IsPropertyOrEventAccessor()) return; if (method.IsDestructor()) { WriteDestructor(method); return; } string name = method.GetMethodName(); WriteMethodPseudoCustomAttributes(method); WriteAttributes(method.Attributes); WriteAttributes(method.SecurityAttributes); if (!method.ContainingTypeDefinition.IsInterface) { if (!method.IsExplicitInterfaceMethod()) WriteVisibility(method.Visibility); WriteMethodModifiers(method); } WriteInterfaceMethodModifiers(method); WriteMethodDefinitionSignature(method, name); WriteMethodBody(method); }
private void WriteMethodDefinition(IMethodDefinition method) { if (method.IsPropertyOrEventAccessor()) { return; } WriteMethodPseudoCustomAttributes(method); WriteAttributes(method.Attributes); WriteAttributes(method.SecurityAttributes); WriteAttributes(method.ReturnValueAttributes, prefix: "return"); if (method.IsDestructor()) { // If platformNotSupportedExceptionMessage is != null we're generating a dummy assembly which means we don't need a destructor at all. if (_platformNotSupportedExceptionMessage == null) { WriteDestructor(method); } return; } var writeVisibility = true; if (method.ContainingTypeDefinition.IsInterface) { writeVisibility = false; } if (method.IsExplicitInterfaceMethod() || method.IsStaticConstructor) { writeVisibility = false; } if (writeVisibility) { WriteVisibility(method.Visibility); } WriteMethodModifiers(method); WriteInterfaceMethodModifiers(method); WriteMethodDefinitionSignature(method); WriteMethodBody(method); }
private void WriteMethodDefinition(IMethodDefinition method) { if (method.IsPropertyOrEventAccessor()) { return; } WriteMethodPseudoCustomAttributes(method); WriteAttributes(method.Attributes); WriteAttributes(method.SecurityAttributes); if (method.IsDestructor()) { // If platformNotSupportedExceptionMessage is != null we're generating a dummy assembly which means we don't need a destructor at all. if (_platformNotSupportedExceptionMessage == null) { WriteDestructor(method); } return; } string name = method.GetMethodName(); if (!method.ContainingTypeDefinition.IsInterface) { if (!method.IsExplicitInterfaceMethod()) { WriteVisibility(method.Visibility); } WriteMethodModifiers(method); } WriteInterfaceMethodModifiers(method); WriteMethodDefinitionSignature(method, name); WriteMethodBody(method); }