CodeDomFixup\CodeDomVisitors\CreateCallbackImpl.cs (34)
18private List<CodeTypeDeclaration> _eventArgsList = new List<CodeTypeDeclaration>();
21private CodeTypeDeclaration _eventBasedDuplexClass;
29protected override bool IsSpecificType(CodeTypeDeclaration type)
37protected override void VisitClientClass(CodeTypeDeclaration type)
40CodeTypeDeclaration serviceContractInterface = CodeDomHelpers.ResolveTypeReference(type.BaseTypes[0].TypeArguments[0]);
41CodeTypeDeclaration callbackInterface = GetCallbackContractType(serviceContractInterface);
46private void CreateEventBasedDuplexClass(CodeTypeDeclaration type, CodeTypeDeclaration callbackInterface)
52CodeTypeDeclaration callbackImpl;
75private static void RemoveAsyncMethods(CodeTypeDeclaration callbackInterface)
91foreach (CodeTypeDeclaration type in _eventArgsList)
102private static void CreateCtorOverload(CodeTypeDeclaration parent, CodeTypeDeclaration callbackImpl)
212private static Dictionary<string, string> GenerateEventAsyncMethods(CodeTypeNameScope nameScope, CodeTypeDeclaration parent, CodeTypeDeclaration callbackInterface, List<CodeTypeDeclaration> eventArgsList)
221CodeTypeDeclaration eventArgs = CreateOperationReceivedEventArgsType(nameScope, method);
242CodeTypeDeclaration operationReceivedEventArgsType, CodeMemberEvent operationCompletedEvent)
313CodeTypeDeclaration operationCompletedEventArgsType)
333private static CodeTypeDeclaration CreateOperationReceivedEventArgsType(CodeTypeNameScope nameScope, CodeMemberMethod syncMethod)
341CodeTypeDeclaration evtArg = new CodeTypeDeclaration();
393private static CodeTypeDeclaration CreateCallbackImplClass(CodeTypeNameScope nameScope, CodeTypeDeclaration parent, CodeTypeDeclaration callbackInterface, Dictionary<string, string> methodNames)
395CodeTypeDeclaration callbackImpl = new CodeTypeDeclaration();
408private static void AddMembers(CodeTypeDeclaration callbackImpl, CodeTypeDeclaration parent)
419private static void AddInitialize(CodeTypeDeclaration callbackImpl, CodeTypeDeclaration parent)
448private static void AddMethods(CodeTypeDeclaration callbackImpl, CodeTypeDeclaration callbackInterface, Dictionary<string, string> methodNames)
495private static CodeTypeDeclaration GetCallbackContractType(CodeTypeDeclaration iface)
CodeDomFixup\ConfigToCode.cs (12)
22foreach (var clientType in FindClientTypes(namespaceDecl))
29private void MoveConfigIntoCode(CodeTypeDeclaration clientType, Collection<ServiceEndpoint> endpoints, CodeNamespace namespaceDecl)
99private void FixupConstructors(CodeTypeDeclaration clientType, bool shouldRemoveDefault, bool endpointConfigurationExists, CodeNamespace namespaceDecl, List<string> endpointNames)
111private static void FixupConstructorsEventBasedDuplex(CodeTypeDeclaration clientType, bool shouldRemoveDefault, bool endpointConfigurationExists)
178private static void FixupConstructorsNonDuplex(CodeTypeDeclaration clientType, bool shouldRemoveDefault, bool endpointConfigurationExists, List<string> endpointNames)
304private void FixupConstructorsDuplex(CodeTypeDeclaration clientType, bool shouldRemoveDefault, bool endpointConfigurationExists, CodeNamespace namespaceDecl, List<string> endpointNames)
429foreach (var extendedClientType in FindExtendedClientTypes(clientType.Name, namespaceDecl))
436private static string ExtractContract(CodeTypeDeclaration clientType)
453private IEnumerable<CodeTypeDeclaration> FindExtendedClientTypes(string clientTypeName, CodeNamespace namespaceDecl)
455foreach (CodeTypeDeclaration type in namespaceDecl.Types)
464private IEnumerable<CodeTypeDeclaration> FindClientTypes(CodeNamespace namespaceDecl)
466foreach (CodeTypeDeclaration codeDecl in namespaceDecl.Types)
FrameworkFork\Microsoft.CodeDom\Compiler\CodeGenerator.cs (27)
31private CodeTypeDeclaration _currentClass;
41protected CodeTypeDeclaration CurrentClass
235private void GenerateType(CodeTypeDeclaration e)
291private void GenerateTypeMember(CodeTypeMember member, CodeTypeDeclaration declaredType)
298if (member is CodeTypeDeclaration)
300((ICodeGenerator)this).GenerateCodeFromType((CodeTypeDeclaration)member, _output.InnerWriter, _options);
382private void GenerateTypeConstructors(CodeTypeDeclaration e)
430foreach (CodeTypeDeclaration c in e.Types)
447void ICodeGenerator.GenerateCodeFromType(CodeTypeDeclaration e, TextWriter w, CodeGeneratorOptions o)
609CodeTypeDeclaration dummyClass = new CodeTypeDeclaration();
651private void GenerateConstructors(CodeTypeDeclaration e)
681private void GenerateEvents(CodeTypeDeclaration e)
829private void GenerateFields(CodeTypeDeclaration e)
859private void GenerateSnippetMembers(CodeTypeDeclaration e)
927private void GenerateMethods(CodeTypeDeclaration e)
966private void GenerateNestedTypes(CodeTypeDeclaration e)
971if (en.Current is CodeTypeDeclaration)
977CodeTypeDeclaration currentClass = (CodeTypeDeclaration)en.Current;
1028private void GenerateProperties(CodeTypeDeclaration e)
2022protected abstract void GenerateEvent(CodeMemberEvent e, CodeTypeDeclaration c);
2041protected abstract void GenerateEntryPointMethod(CodeEntryPointMethod e, CodeTypeDeclaration c);
2049protected abstract void GenerateMethod(CodeMemberMethod e, CodeTypeDeclaration c);
2056protected abstract void GenerateProperty(CodeMemberProperty e, CodeTypeDeclaration c);
2063protected abstract void GenerateConstructor(CodeConstructor e, CodeTypeDeclaration c);
2076protected abstract void GenerateTypeStart(CodeTypeDeclaration e);
2082protected abstract void GenerateTypeEnd(CodeTypeDeclaration e);
FrameworkFork\Microsoft.CodeDom\Microsoft\CSharpCodeProvider.cs (27)
112private CodeTypeDeclaration _currentClass;
873CodeTypeDeclaration dummyClass = new CodeTypeDeclaration();
909private void GenerateEvents(CodeTypeDeclaration e)
940private void GenerateFields(CodeTypeDeclaration e)
1833private void GenerateEvent(CodeMemberEvent e, CodeTypeDeclaration c)
2040private void GenerateEntryPointMethod(CodeEntryPointMethod e, CodeTypeDeclaration c)
2058private void GenerateMethods(CodeTypeDeclaration e)
2103private void GenerateMethod(CodeMemberMethod e, CodeTypeDeclaration c)
2164private void GenerateProperties(CodeTypeDeclaration e)
2199private void GenerateProperty(CodeMemberProperty e, CodeTypeDeclaration c)
2498private void GenerateConstructors(CodeTypeDeclaration e)
2534private void GenerateConstructor(CodeConstructor e, CodeTypeDeclaration c)
2630private void GenerateType(CodeTypeDeclaration e)
2688foreach (CodeTypeDeclaration c in e.Types)
2704private void GenerateTypeStart(CodeTypeDeclaration e)
2761private void GenerateTypeMember(CodeTypeMember member, CodeTypeDeclaration declaredType)
2768if (member is CodeTypeDeclaration)
2770((ICodeGenerator)this).GenerateCodeFromType((CodeTypeDeclaration)member, _output.InnerWriter, _options);
2852private void GenerateTypeConstructors(CodeTypeDeclaration e)
2882private void GenerateSnippetMembers(CodeTypeDeclaration e)
2932private void GenerateNestedTypes(CodeTypeDeclaration e)
2937if (en.Current is CodeTypeDeclaration)
2943CodeTypeDeclaration currentClass = (CodeTypeDeclaration)en.Current;
3170private void OutputTypeAttributes(CodeTypeDeclaration e)
3249private void GenerateTypeEnd(CodeTypeDeclaration e)
4286void ICodeGenerator.GenerateCodeFromType(CodeTypeDeclaration e, TextWriter w, CodeGeneratorOptions o)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ClientClassGenerator.cs (25)
163CodeTypeDeclaration clientType = context.TypeFactory.CreateClassType();
232private static CodeMemberMethod GenerateClientClassMethod(CodeTypeDeclaration clientType, CodeTypeReference contractTypeRef, CodeMemberMethod method, bool addHelperMethod, CodeTypeReference declaringContractTypeRef)
271CodeTypeDeclaration paramTypeDecl = ServiceContractGenerator.NamespaceHelper.GetCodeType(param.Type);
290CodeTypeDeclaration returnTypeDecl = ServiceContractGenerator.NamespaceHelper.GetCodeType(method.ReturnType);
312private static CodeMethodReturnStatement GenerateParameters(CodeMemberMethod helperMethod, CodeTypeDeclaration codeTypeDeclaration, CodeExpression target, FieldDirection dir)
321CodeTypeDeclaration bodyTypeDecl = ServiceContractGenerator.NamespaceHelper.GetCodeType(field.Type);
371CodeTypeDeclaration typeDeclaration = (CodeTypeDeclaration)typeDeclarationObject;
392foreach (CodeTypeDeclaration codeTypeDeclaration in codeTypeDeclarations)
485private static void GenerateEventAsyncMethods(ServiceContractGenerationContext context, CodeTypeDeclaration clientType,
488CodeTypeDeclaration operationCompletedEventArgsType = CreateOperationCompletedEventArgsType(context, syncMethodName, endMethod);
510private static CodeTypeDeclaration CreateOperationCompletedEventArgsType(ServiceContractGenerationContext context,
519CodeTypeDeclaration argsType = context.TypeFactory.CreateClassType();
595private static CodeMemberProperty CreateEventAsyncCompletedArgsTypeProperty(CodeTypeDeclaration ownerTypeDecl,
616CodeTypeDeclaration clientType, string syncMethodName, CodeTypeDeclaration operationCompletedEventArgsType)
639CodeTypeDeclaration clientType, string syncMethodName)
651private static CodeMemberMethod CreateBeginOperationMethod(ServiceContractGenerationContext context, CodeTypeDeclaration clientType,
694CodeTypeDeclaration clientType, string syncMethodName)
706private static CodeMemberMethod CreateEndOperationMethod(ServiceContractGenerationContext context, CodeTypeDeclaration clientType, string syncMethodName, CodeMemberMethod endMethod)
769CodeTypeDeclaration clientType, string syncMethodName)
781private static CodeMemberMethod CreateOperationCompletedMethod(ServiceContractGenerationContext context, CodeTypeDeclaration clientType,
782string syncMethodName, CodeTypeDeclaration operationCompletedEventArgsType, CodeMemberEvent operationCompletedEvent)
837private static CodeMemberMethod CreateEventAsyncMethod(ServiceContractGenerationContext context, CodeTypeDeclaration clientType,
888private static CodeMemberMethod CreateEventAsyncMethodOverload(CodeTypeDeclaration clientType, CodeMemberMethod eventAsyncMethod)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\OperationContractGenerationContext.cs (7)
21private readonly CodeTypeDeclaration _declaringType;
27private OperationContractGenerationContext(ServiceContractGenerator serviceContractGenerator, ServiceContractGenerationContext contract, OperationDescription operation, CodeTypeDeclaration declaringType)
42public OperationContractGenerationContext(ServiceContractGenerator serviceContractGenerator, ServiceContractGenerationContext contract, OperationDescription operation, CodeTypeDeclaration declaringType, CodeMemberMethod syncMethod, CodeMemberMethod beginMethod, CodeMemberMethod endMethod, CodeMemberMethod taskMethod)
60public OperationContractGenerationContext(ServiceContractGenerator serviceContractGenerator, ServiceContractGenerationContext contract, OperationDescription operation, CodeTypeDeclaration declaringType, CodeMemberMethod syncMethod, CodeMemberMethod beginMethod, CodeMemberMethod endMethod)
75public OperationContractGenerationContext(ServiceContractGenerator serviceContractGenerator, ServiceContractGenerationContext contract, OperationDescription operation, CodeTypeDeclaration declaringType, CodeMemberMethod syncMethod, CodeMemberMethod taskMethod)
87public OperationContractGenerationContext(ServiceContractGenerator serviceContractGenerator, ServiceContractGenerationContext contract, OperationDescription operation, CodeTypeDeclaration declaringType, CodeMemberMethod method)
103public CodeTypeDeclaration DeclaringType