async internal static Task<MethodEntity> FindProviderAndCreateMethodEntityAsync(MethodDescriptor methodDescriptor)
        {
            MethodEntity methodEntity = null;

            var pair = await ProjectCodeProvider.GetProjectProviderAndSyntaxAsync(methodDescriptor);

            if (pair != null)
            {
                var provider = pair.Item1;
                var tree = pair.Item2;
                var model = provider.Compilation.GetSemanticModel(tree);
                var methodEntityGenerator = new MethodSyntaxProcessor(model, provider, tree, methodDescriptor);
                methodEntity = methodEntityGenerator.ParseMethod();
            }
            else
            {
                var libraryMethodVisitor = new LibraryMethodProcessor(methodDescriptor);
                methodEntity = libraryMethodVisitor.ParseLibraryMethod();
            }
            return methodEntity;
        }
        async internal static Task<MethodEntity> CreateMethodEntityUsingGrainsAsync(MethodDescriptor methodDescriptor)
        {
			Logger.Instance.Log("OrleansDispatcher", "CreateMethodEntityUsingGrainsAsync", "Creating new MethodEntity for {0}", methodDescriptor);

			MethodEntity methodEntity = null;
            var solutionGrain = SolutionGrainFactory.GetGrain("Solution");
            IProjectCodeProviderGrain providerGrain = await solutionGrain.GetCodeProviderAsync(methodDescriptor);
            if (providerGrain == null)
            {
                var libraryMethodVisitor = new LibraryMethodProcessor(methodDescriptor);
                methodEntity = libraryMethodVisitor.ParseLibraryMethod();
            }
            else
            {
                methodEntity = (MethodEntity)await providerGrain.CreateMethodEntityAsync(methodDescriptor);
            }
            return methodEntity;
        }