예제 #1
0
        private void WeaveMethod(MethodDefinition methodDefinition, ReferenceContainer references)
        {
            var asyncAttribute = methodDefinition.CustomAttributes.FirstOrDefault(_ => _.AttributeType.Name == "AsyncStateMachineAttribute");

            if (asyncAttribute == null)
            {
                var returnVoid      = methodDefinition.ReturnType == ModuleDefinition.TypeSystem.Void;
                var methodProcessor = new MethodProcessor();

                methodProcessor.Process(methodDefinition, returnVoid, references);
                return;
            }
            LogError(string.Format("Could not process '{0}'. async methods are not currently supported. Feel free to do it yourself if you want this feature.", methodDefinition.FullName));
        }
예제 #2
0
        private void WeaveMethod(MethodDefinition methodDefinition, ReferenceContainer references)
        {
            var asyncAttribute = methodDefinition.CustomAttributes.FirstOrDefault(_ => _.AttributeType.Name == "AsyncStateMachineAttribute");
            if (asyncAttribute == null)
            {
                var returnVoid = methodDefinition.ReturnType == ModuleDefinition.TypeSystem.Void;
                var methodProcessor = new MethodProcessor();

                methodProcessor.Process(methodDefinition, returnVoid, references);
                return;
            }
            LogError(string.Format("Could not process '{0}'. async methods are not currently supported. Feel free to do it yourself if you want this feature.", methodDefinition.FullName));
        }