public List<string> Generated_GenerateBehaviors() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("<behaviors>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); int __loop1_iteration = 0; var __loop1_result = (from __loop1_tmp_item___noname1 in EnumerableExtensions.Enumerate((Instances).GetEnumerator()) from __loop1_tmp_item_endpoint in EnumerableExtensions.Enumerate((__loop1_tmp_item___noname1).GetEnumerator()).OfType<Endpoint>() select new { __loop1_item___noname1 = __loop1_tmp_item___noname1, __loop1_item_endpoint = __loop1_tmp_item_endpoint, }).ToArray(); foreach (var __loop1_item in __loop1_result) { var __noname1 = __loop1_item.__loop1_item___noname1; var endpoint = __loop1_item.__loop1_item_endpoint; ++__loop1_iteration; __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <serviceBehaviors>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <behavior name=\""); __printer.Write(endpoint.Name); __printer.WriteTemplateOutput("Behavior\"> "); __printer.WriteLine(); __printer.WriteTemplateOutput(" <serviceMetadata httpGetEnabled=\"true\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <serviceDebug includeExceptionDetailInFaults=\"false\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </behavior>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </serviceBehaviors>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <endpointBehaviors>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <behavior name=\"web\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <webHttp/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </behavior>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </endpointBehaviors>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("</behaviors>"); __printer.WriteLine(); } return __result; }
public List<string> Generated_Generate_classpath() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); __printer.WriteLine(); __printer.WriteTemplateOutput("<classpath>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <classpathentry kind=\"src\" path=\"src\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <classpathentry kind=\"con\" path=\"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/WebSphere Application Server V8.5 JRE\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <attributes>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <attribute name=\"owner.project.facets\" value=\"java\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </attributes>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </classpathentry>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <classpathentry kind=\"src\" path=\".apt_generated\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <attributes>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <attribute name=\"optional\" value=\"true\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </attributes>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </classpathentry>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <classpathentry kind=\"con\" path=\"org.eclipse.jst.server.core.container/com.ibm.ws.ast.st.runtime.runtimeTarget.v85/was.base.v85\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <attributes>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <attribute name=\"owner.project.facets\" value=\"jst.web\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </attributes>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </classpathentry>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <classpathentry kind=\"con\" path=\"org.eclipse.jst.j2ee.internal.web.container\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <classpathentry kind=\"con\" path=\"org.eclipse.jst.j2ee.internal.module.container\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <classpathentry kind=\"output\" path=\"WebContent/WEB-INF/classes\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput("</classpath>"); __printer.WriteLine(); } return __result; }
public List<string> Generated_Generate_apt_core_prefs() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("org.eclipse.jdt.apt.processorOptions/com.ibm.ws.ast.jws.annotations.processor.validateWSDL=on"); __printer.WriteLine(); __printer.WriteTemplateOutput("org.eclipse.jdt.apt.aptEnabled=true"); __printer.WriteLine(); __printer.WriteTemplateOutput("eclipse.preferences.version=1"); __printer.WriteLine(); __printer.WriteTemplateOutput("org.eclipse.jdt.apt.reconcileEnabled=true"); __printer.WriteLine(); } return __result; }
public List<string> Generated_GenerateClientAppConfig() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("<?xml version=\"1.0\"?>"); __printer.WriteLine(); __printer.WriteTemplateOutput("<configuration>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <system.serviceModel>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); __printer.Write(Generated_GenerateClientBehaviors()); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); __printer.Write(Generated_GenerateClientEndpoints()); __printer.WriteLine(); __printer.WriteTemplateOutput(" </system.serviceModel>"); __printer.WriteLine(); __printer.WriteTemplateOutput("</configuration>"); __printer.WriteLine(); } return __result; }
public List<string> Generated_GenerateExpressionHelper(Namespace ns) { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("^"); __printer.WriteLine(); __printer.WriteTemplateOutput("package "); __printer.Write(Generated_GetPackage(ns).ToLower()); __printer.WriteTemplateOutput(";"); __printer.WriteLine(); __printer.WriteTemplateOutput("^"); __printer.WriteLine(); __printer.WriteTemplateOutput("public interface ExpressionHelper<T> {"); __printer.WriteLine(); __printer.WriteTemplateOutput("^"); __printer.WriteLine(); __printer.WriteTemplateOutput(" T doWork();"); __printer.WriteLine(); __printer.WriteTemplateOutput("}"); __printer.WriteLine(); } return __result; }
public List<string> Generated_GenerateIssuedTokenParameters(IssuedTokenVersion tokenVersion, IssuedTokenType tokenType, IssuedTokenIssuer tokenIssuer, IEnumerable<ClaimsetType> tokenClaims) { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("<issuedTokenParameters \\"); __printer.WriteLine(); if (tokenVersion == IssuedTokenVersion.Token10) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("tokenType=\"urn:oasis:names:tc:SAML:1.0:assertion\" \\"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); if (tokenVersion == IssuedTokenVersion.Token11) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("tokenType=\"http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1\" \\"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); if (tokenVersion == IssuedTokenVersion.Token20) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("tokenType=\"urn:oasis:names:tc:SAML:2.0:assertion\" \\"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); if (tokenType == IssuedTokenType.Symmetric128) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("keyType=\"SymmetricKey\" keySize=\"128\">"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); if (tokenType == IssuedTokenType.Symmetric192) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("keyType=\"SymmetricKey\" keySize=\"192\">"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); if (tokenType == IssuedTokenType.Symmetric256) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("keyType=\"SymmetricKey\" keySize=\"256\">"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); if (tokenType == IssuedTokenType.Asymmetric1024) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("keyType=\"AsymmetricKey\" keySize=\"1024\">"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); if (tokenType == IssuedTokenType.Asymmetric2048) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("keyType=\"AsymmetricKey\" keySize=\"2048\">"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); if (tokenType == IssuedTokenType.Asymmetric3072) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("keyType=\"AsymmetricKey\" keySize=\"3072\">"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); if (tokenClaims != null) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <claimTypeRequirements>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); int __loop6_iteration = 0; var __loop6_result = (from __loop6_tmp_item___noname6 in EnumerableExtensions.Enumerate((tokenClaims).GetEnumerator()) from __loop6_tmp_item_claim in EnumerableExtensions.Enumerate((__loop6_tmp_item___noname6).GetEnumerator()).OfType<ClaimsetType>() select new { __loop6_item___noname6 = __loop6_tmp_item___noname6, __loop6_item_claim = __loop6_tmp_item_claim, }).ToArray(); foreach (var __loop6_item in __loop6_result) { var __noname6 = __loop6_item.__loop6_item___noname6; var claim = __loop6_item.__loop6_item_claim; ++__loop6_iteration; __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <add claimType=\"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/"); __printer.Write(claim.Name); __printer.WriteTemplateOutput("\" isOptional=\"false\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" </claimTypeRequirements>"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); if (tokenIssuer != null) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <issuer address=\""); __printer.Write(tokenIssuer.Address); __printer.WriteTemplateOutput("\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); if (tokenIssuer.MetadataAddress != null && tokenIssuer.MetadataAddress.Length > 0) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <issuerMetadata address=\""); __printer.Write(tokenIssuer.MetadataAddress); __printer.WriteTemplateOutput("\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); } __printer.TrimLine(); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("</issuedTokenParameters>"); __printer.WriteLine(); } return __result; }
public List<string> Generated_GenerateClientBehaviors() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("<behaviors>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <endpointBehaviors>"); __printer.WriteLine(); int __loop10_iteration = 0; var __loop10_result = (from __loop10_tmp_item___noname10 in EnumerableExtensions.Enumerate((Instances).GetEnumerator()) from __loop10_tmp_item_endpoint in EnumerableExtensions.Enumerate((__loop10_tmp_item___noname10).GetEnumerator()).OfType<Endpoint>() select new { __loop10_item___noname10 = __loop10_tmp_item___noname10, __loop10_item_endpoint = __loop10_tmp_item_endpoint, }).ToArray(); foreach (var __loop10_item in __loop10_result) { var __noname10 = __loop10_item.__loop10_item___noname10; var endpoint = __loop10_item.__loop10_item_endpoint; ++__loop10_iteration; __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <behavior name=\""); __printer.Write(endpoint.Name); __printer.WriteTemplateOutput("Behavior\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <dataContractSerializer maxItemsInObjectGraph=\"2147483647\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); int __loop11_iteration = 0; var __loop11_result = (from __loop11_tmp_item___noname11 in EnumerableExtensions.Enumerate((endpoint).GetEnumerator()) from __loop11_tmp_item_binding in EnumerableExtensions.Enumerate((__loop11_tmp_item___noname11.Binding).GetEnumerator()) select new { __loop11_item___noname11 = __loop11_tmp_item___noname11, __loop11_item_binding = __loop11_tmp_item_binding, }).ToArray(); foreach (var __loop11_item in __loop11_result) { var __noname11 = __loop11_item.__loop11_item___noname11; var binding = __loop11_item.__loop11_item_binding; ++__loop11_iteration; __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); int __loop12_iteration = 0; var __loop12_result = (from __loop12_tmp_item___noname12 in EnumerableExtensions.Enumerate((binding).GetEnumerator()) from __loop12_tmp_item_Protocols in EnumerableExtensions.Enumerate((__loop12_tmp_item___noname12.Protocols).GetEnumerator()) from __loop12_tmp_item_security in EnumerableExtensions.Enumerate((__loop12_tmp_item_Protocols).GetEnumerator()).OfType<SecurityProtocolBindingElement>() select new { __loop12_item___noname12 = __loop12_tmp_item___noname12, __loop12_item_Protocols = __loop12_tmp_item_Protocols, __loop12_item_security = __loop12_tmp_item_security, }).ToArray(); foreach (var __loop12_item in __loop12_result) { var __noname12 = __loop12_item.__loop12_item___noname12; var Protocols = __loop12_item.__loop12_item_Protocols; var security = __loop12_item.__loop12_item_security; ++__loop12_iteration; __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <clientCredentials>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <clientCertificate storeLocation=\"LocalMachine\" storeName=\"My\" x509FindType=\"FindBySubjectName\" findValue=\"WspClient\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <serviceCertificate>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <defaultCertificate storeLocation=\"LocalMachine\" storeName=\"My\" x509FindType=\"FindBySubjectName\" findValue=\"WspService\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <authentication certificateValidationMode=\"PeerOrChainTrust\" trustedStoreLocation=\"LocalMachine\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </serviceCertificate>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </clientCredentials>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" </behavior>"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" </endpointBehaviors>"); __printer.WriteLine(); __printer.WriteTemplateOutput("</behaviors>"); __printer.WriteLine(); } return __result; }
public List<string> Generated_GenerateBindings() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("<bindings>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <customBinding>"); __printer.WriteLine(); int __loop1_iteration = 0; var __loop1_result = (from __loop1_tmp_item___noname1 in EnumerableExtensions.Enumerate((Instances).GetEnumerator()) from __loop1_tmp_item_binding in EnumerableExtensions.Enumerate((__loop1_tmp_item___noname1).GetEnumerator()).OfType<Binding>() select new { __loop1_item___noname1 = __loop1_tmp_item___noname1, __loop1_item_binding = __loop1_tmp_item_binding, }).ToArray(); foreach (var __loop1_item in __loop1_result) { var __noname1 = __loop1_item.__loop1_item___noname1; var binding = __loop1_item.__loop1_item_binding; ++__loop1_iteration; __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <binding name=\""); __printer.Write(binding.Name); __printer.WriteTemplateOutput("\">"); __printer.WriteLine(); int __loop2_iteration = 0; var __loop2_result = (from __loop2_tmp_item___noname2 in EnumerableExtensions.Enumerate((binding.Protocols).GetEnumerator()) from __loop2_tmp_item_security in EnumerableExtensions.Enumerate((__loop2_tmp_item___noname2).GetEnumerator()).OfType<SecurityProtocolBindingElement>() select new { __loop2_item___noname2 = __loop2_tmp_item___noname2, __loop2_item_security = __loop2_tmp_item_security, }).ToArray(); foreach (var __loop2_item in __loop2_result) { var __noname2 = __loop2_item.__loop2_item___noname2; var security = __loop2_item.__loop2_item_security; ++__loop2_iteration; __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <security defaultAlgorithmSuite=\""); __printer.Write(security.AlgorithmSuite.ToString()); __printer.WriteTemplateOutput("\" securityHeaderLayout=\""); __printer.Write(security.HeaderLayout.ToString()); __printer.WriteTemplateOutput("\" messageProtectionOrder=\""); __printer.Write(security.ProtectionOrder.ToString()); __printer.WriteTemplateOutput("\" requireSignatureConfirmation=\""); __printer.Write(security.RequireSignatureConfirmation.ToString().ToLower()); __printer.WriteTemplateOutput("\" \\"); __printer.WriteLine(); if (security is MutualCertificateSecurityProtocolBindingElement) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("authenticationMode=\"MutualCertificateDuplex\" messageSecurityVersion=\"WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10\">"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); if (security is StsSecurityProtocolBindingElement) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("authenticationMode=\"IssuedToken\" messageSecurityVersion=\"WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10\" requireDerivedKeys=\""); __printer.Write(((StsSecurityProtocolBindingElement)security).DerivedKeys.ToString().ToLower()); __printer.WriteTemplateOutput("\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); __printer.Write(Generated_GenerateIssuedTokenParameters(((StsSecurityProtocolBindingElement)security).TokenVersion, ((StsSecurityProtocolBindingElement)security).TokenType, ((StsSecurityProtocolBindingElement)security).TokenIssuer, null)); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); if (security is SamlSecurityProtocolBindingElement) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("authenticationMode=\"IssuedToken\" messageSecurityVersion=\"WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10\" >"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); __printer.Write(Generated_GenerateIssuedTokenParameters(((SamlSecurityProtocolBindingElement)security).TokenVersion, ((SamlSecurityProtocolBindingElement)security).TokenType, ((SamlSecurityProtocolBindingElement)security).TokenIssuer, ((SamlSecurityProtocolBindingElement)security).Claims)); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); if (security is SecureConversationSecurityProtocolBindingElement) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("authenticationMode=\"SecureConversation\" messageSecurityVersion=\"WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10\" requireDerivedKeys=\""); __printer.Write(((SecureConversationSecurityProtocolBindingElement)security).DerivedKeys.ToString().ToLower()); __printer.WriteTemplateOutput("\">"); __printer.WriteLine(); if (((SecureConversationSecurityProtocolBindingElement)security).Bootstrap != null) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <secureConversationBootstrap defaultAlgorithmSuite=\""); __printer.Write(security.AlgorithmSuite.ToString()); __printer.WriteTemplateOutput("\" securityHeaderLayout=\""); __printer.Write(security.HeaderLayout.ToString()); __printer.WriteTemplateOutput("\" messageProtectionOrder=\""); __printer.Write(security.ProtectionOrder.ToString()); __printer.WriteTemplateOutput("\" requireSignatureConfirmation=\""); __printer.Write(((SecureConversationSecurityProtocolBindingElement)security).Bootstrap.RequireSignatureConfirmation.ToString().ToLower()); __printer.WriteTemplateOutput("\" requireDerivedKeys=\""); __printer.Write(((SecureConversationSecurityProtocolBindingElement)security).DerivedKeys.ToString().ToLower()); __printer.WriteTemplateOutput("\" \\"); __printer.WriteLine(); if (((SecureConversationSecurityProtocolBindingElement)security).Bootstrap is MutualCertificateBootstrapProtocolBindingElement) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("authenticationMode=\"MutualCertificateDuplex\" messageSecurityVersion=\"WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10\"/>"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); if (((SecureConversationSecurityProtocolBindingElement)security).Bootstrap is StsBootstrapProtocolBindingElement) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("authenticationMode=\"IssuedToken\" messageSecurityVersion=\"WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); __printer.Write(Generated_GenerateIssuedTokenParameters(((StsBootstrapProtocolBindingElement)((SecureConversationSecurityProtocolBindingElement)security).Bootstrap).TokenVersion, ((StsBootstrapProtocolBindingElement)((SecureConversationSecurityProtocolBindingElement)security).Bootstrap).TokenType, ((StsBootstrapProtocolBindingElement)((SecureConversationSecurityProtocolBindingElement)security).Bootstrap).TokenIssuer, null)); __printer.WriteLine(); __printer.WriteTemplateOutput(" </secureConversationBootstrap>"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); if (((SecureConversationSecurityProtocolBindingElement)security).Bootstrap is SamlBootstrapProtocolBindingElement) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("authenticationMode=\"SecureConversation\" messageSecurityVersion=\"WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); __printer.Write(Generated_GenerateIssuedTokenParameters(((SamlBootstrapProtocolBindingElement)((SecureConversationSecurityProtocolBindingElement)security).Bootstrap).TokenVersion, ((SamlBootstrapProtocolBindingElement)((SecureConversationSecurityProtocolBindingElement)security).Bootstrap).TokenType, ((SamlBootstrapProtocolBindingElement)((SecureConversationSecurityProtocolBindingElement)security).Bootstrap).TokenIssuer, ((SamlBootstrapProtocolBindingElement)((SecureConversationSecurityProtocolBindingElement)security).Bootstrap).Claims)); __printer.WriteLine(); __printer.WriteTemplateOutput(" </secureConversationBootstrap>"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); } else { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <secureConversationBootstrap />"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); } else { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <secureConversationBootstrap />"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" </security>"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); int __loop3_iteration = 0; var __loop3_result = (from __loop3_tmp_item___noname3 in EnumerableExtensions.Enumerate((binding.Protocols).GetEnumerator()) from __loop3_tmp_item_transaction in EnumerableExtensions.Enumerate((__loop3_tmp_item___noname3).GetEnumerator()).OfType<AtomicTransactionProtocolBindingElement>() select new { __loop3_item___noname3 = __loop3_tmp_item___noname3, __loop3_item_transaction = __loop3_tmp_item_transaction, }).ToArray(); foreach (var __loop3_item in __loop3_result) { var __noname3 = __loop3_item.__loop3_item___noname3; var transaction = __loop3_item.__loop3_item_transaction; ++__loop3_iteration; __printer.TrimLine(); __printer.WriteLine(); if (transaction.Version == AtomicTransactionVersion.AtomicTransaction10) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <transactionFlow transactionProtocol=\"WSAtomicTransactionOctober2004\" />"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); int __loop4_iteration = 0; var __loop4_result = (from __loop4_tmp_item___noname4 in EnumerableExtensions.Enumerate((binding.Protocols).GetEnumerator()) from __loop4_tmp_item_reliable in EnumerableExtensions.Enumerate((__loop4_tmp_item___noname4).GetEnumerator()).OfType<ReliableMessagingProtocolBindingElement>() select new { __loop4_item___noname4 = __loop4_tmp_item___noname4, __loop4_item_reliable = __loop4_tmp_item_reliable, }).ToArray(); foreach (var __loop4_item in __loop4_result) { var __noname4 = __loop4_item.__loop4_item___noname4; var reliable = __loop4_item.__loop4_item_reliable; ++__loop4_iteration; __printer.TrimLine(); __printer.WriteLine(); if (reliable.Version == ReliableMessagingVersion.ReliableMessaging11) { __printer.TrimLine(); __printer.WriteLine(); if (reliable.InOrder == true) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <reliableSession reliableMessagingVersion=\"WSReliableMessaging11\" ordered=\"true\" />"); __printer.WriteLine(); } else { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <reliableSession reliableMessagingVersion=\"WSReliableMessaging11\" ordered=\"false\" />"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); if (binding.Encoding is SoapEncodingBindingElement) { __printer.TrimLine(); __printer.WriteLine(); if (((SoapEncodingBindingElement)binding.Encoding).MtomEnabled == true) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <mtomMessageEncoding messageVersion=\"\\"); __printer.WriteLine(); } else { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <textMessageEncoding messageVersion=\"\\"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); if (((SoapEncodingBindingElement)binding.Encoding).Version == SoapVersion.Soap11) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("Soap11\\"); __printer.WriteLine(); } else { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("Soap12\\"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); int __loop5_iteration = 0; var __loop5_result = (from __loop5_tmp_item___noname5 in EnumerableExtensions.Enumerate((binding.Protocols).GetEnumerator()) from __loop5_tmp_item_addressing in EnumerableExtensions.Enumerate((__loop5_tmp_item___noname5).GetEnumerator()).OfType<AddressingProtocolBindingElement>() select new { __loop5_item___noname5 = __loop5_tmp_item___noname5, __loop5_item_addressing = __loop5_tmp_item_addressing, }).ToArray(); foreach (var __loop5_item in __loop5_result) { var __noname5 = __loop5_item.__loop5_item___noname5; var addressing = __loop5_item.__loop5_item_addressing; ++__loop5_iteration; __printer.TrimLine(); __printer.WriteLine(); if (addressing.Version == AddressingVersion.Addressing10) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("WSAddressing10\\"); __printer.WriteLine(); } else { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("WSAddressingAugust2004\\"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("\" maxReadPoolSize=\"100000000\" maxWritePoolSize=\"100000000\" >"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <readerQuotas maxArrayLength=\"100000000\" maxDepth=\"200\" maxStringContentLength=\"1000000\" maxBytesPerRead=\"1000000\"/>"); __printer.WriteLine(); if (((SoapEncodingBindingElement)binding.Encoding).MtomEnabled == true) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" </mtomMessageEncoding>"); __printer.WriteLine(); } else { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" </textMessageEncoding>"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); if (binding.Transport is HttpTransportBindingElement) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <httpTransport maxReceivedMessageSize=\"100000000\" maxBufferSize=\"100000000\" maxBufferPoolSize=\"100000000\"/>"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); if (binding.Transport is HttpsTransportBindingElement) { __printer.TrimLine(); __printer.WriteLine(); if (((HttpsTransportBindingElement)binding.Transport).ClientAuthentication == HttpsClientAuthentication.Certificate) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <httpsTransport requireClientCertificate=\"true\" />"); __printer.WriteLine(); } else { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <httpsTransport requireClientCertificate=\"false\" />"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" </binding>"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" </customBinding>"); __printer.WriteLine(); __printer.WriteTemplateOutput("</bindings>"); __printer.WriteLine(); } return __result; }
public List<string> Generated_GenerateServicesDefaultAspxCs() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("using System;"); __printer.WriteLine(); __printer.WriteTemplateOutput("using System.Collections.Generic;"); __printer.WriteLine(); __printer.WriteTemplateOutput("using System.Linq;"); __printer.WriteLine(); __printer.WriteTemplateOutput("using System.Web;"); __printer.WriteLine(); __printer.WriteTemplateOutput("using System.Web.UI;"); __printer.WriteLine(); __printer.WriteTemplateOutput("using System.Web.UI.WebControls;"); __printer.WriteLine(); __printer.WriteTemplateOutput("namespace Services"); __printer.WriteLine(); __printer.WriteTemplateOutput("{"); __printer.WriteLine(); __printer.WriteTemplateOutput(" public partial class _Default : System.Web.UI.Page"); __printer.WriteLine(); __printer.WriteTemplateOutput(" {"); __printer.WriteLine(); __printer.WriteTemplateOutput(" protected void Page_Load(object sender, EventArgs e)"); __printer.WriteLine(); __printer.WriteTemplateOutput(" {"); __printer.WriteLine(); __printer.WriteTemplateOutput(" }"); __printer.WriteLine(); __printer.WriteTemplateOutput(" }"); __printer.WriteLine(); __printer.WriteTemplateOutput("}"); __printer.WriteLine(); } return __result; }
public List<string> Generated_GenerateService(Endpoint endp) { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("<%@ ServiceHost Language=\"C#\" Debug=\"true\" Service=\""); __printer.Write(endp.Namespace.FullName); __printer.WriteTemplateOutput("."); __printer.Write(endp.Name); __printer.WriteTemplateOutput("\" CodeBehind=\"~/App_Code/"); __printer.Write(endp.Name); __printer.WriteTemplateOutput(".cs\" %>"); __printer.WriteLine(); } return __result; }
public List<string> Generated_GenerateAssemblyInfo() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("using System.Reflection;"); __printer.WriteLine(); __printer.WriteTemplateOutput("using System.Runtime.CompilerServices;"); __printer.WriteLine(); __printer.WriteTemplateOutput("using System.Runtime.InteropServices;"); __printer.WriteLine(); __printer.WriteTemplateOutput("// General Information about an assembly is controlled through the following "); __printer.WriteLine(); __printer.WriteTemplateOutput("// set of attributes. Change these attribute values to modify the information"); __printer.WriteLine(); __printer.WriteTemplateOutput("// associated with an assembly."); __printer.WriteLine(); __printer.Write("["); __printer.WriteTemplateOutput("assembly: AssemblyTitle(\""); __printer.Write(Properties.ProjectName); __printer.WriteTemplateOutput("Client\")"); __printer.Write("]"); __printer.WriteLine(); __printer.Write("["); __printer.WriteTemplateOutput("assembly: AssemblyDescription(\"\")"); __printer.Write("]"); __printer.WriteLine(); __printer.Write("["); __printer.WriteTemplateOutput("assembly: AssemblyConfiguration(\"\")"); __printer.Write("]"); __printer.WriteLine(); __printer.Write("["); __printer.WriteTemplateOutput("assembly: AssemblyCompany(\"\")"); __printer.Write("]"); __printer.WriteLine(); __printer.Write("["); __printer.WriteTemplateOutput("assembly: AssemblyProduct(\""); __printer.Write(Properties.ProjectName); __printer.WriteTemplateOutput("Client\")"); __printer.Write("]"); __printer.WriteLine(); __printer.Write("["); __printer.WriteTemplateOutput("assembly: AssemblyCopyright(\"Copyright © 2014\")"); __printer.Write("]"); __printer.WriteLine(); __printer.Write("["); __printer.WriteTemplateOutput("assembly: AssemblyTrademark(\"\")"); __printer.Write("]"); __printer.WriteLine(); __printer.Write("["); __printer.WriteTemplateOutput("assembly: AssemblyCulture(\"\")"); __printer.Write("]"); __printer.WriteLine(); __printer.WriteTemplateOutput("// Setting ComVisible to false makes the types in this assembly not visible "); __printer.WriteLine(); __printer.WriteTemplateOutput("// to COM components. If you need to access a type in this assembly from "); __printer.WriteLine(); __printer.WriteTemplateOutput("// COM, set the ComVisible attribute to true on that type."); __printer.WriteLine(); __printer.Write("["); __printer.WriteTemplateOutput("assembly: ComVisible(false)"); __printer.Write("]"); __printer.WriteLine(); __printer.WriteTemplateOutput("// The following GUID is for the ID of the typelib if this project is exposed to COM"); __printer.WriteLine(); __printer.Write("["); __printer.WriteTemplateOutput("assembly: Guid(\"ef038eee-e47d-4905-84cc-5e147df1ffec\")"); __printer.Write("]"); __printer.WriteLine(); __printer.WriteTemplateOutput("// Version information for an assembly consists of the following four values:"); __printer.WriteLine(); __printer.WriteTemplateOutput("//"); __printer.WriteLine(); __printer.WriteTemplateOutput("// Major Version"); __printer.WriteLine(); __printer.WriteTemplateOutput("// Minor Version "); __printer.WriteLine(); __printer.WriteTemplateOutput("// Build Number"); __printer.WriteLine(); __printer.WriteTemplateOutput("// Revision"); __printer.WriteLine(); __printer.WriteTemplateOutput("//"); __printer.WriteLine(); __printer.WriteTemplateOutput("// You can specify all the values or you can default the Build and Revision Numbers "); __printer.WriteLine(); __printer.WriteTemplateOutput("// by using the '*' as shown below:"); __printer.WriteLine(); __printer.WriteTemplateOutput("// "); __printer.Write("["); __printer.WriteTemplateOutput("assembly: AssemblyVersion(\"1.0.*\")"); __printer.Write("]"); __printer.WriteLine(); __printer.Write("["); __printer.WriteTemplateOutput("assembly: AssemblyVersion(\"1.0.0.0\")"); __printer.Write("]"); __printer.WriteLine(); __printer.Write("["); __printer.WriteTemplateOutput("assembly: AssemblyFileVersion(\"1.0.0.0\")"); __printer.Write("]"); __printer.WriteLine(); } return __result; }
public List<string> Generated_Generate_project_ear() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); __printer.WriteLine(); __printer.WriteTemplateOutput("<projectDescription>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <name>"); __printer.Write(Generated_GetEarProjectName()); __printer.WriteTemplateOutput("</name>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <comment></comment>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <projects>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <project>"); __printer.Write(Generated_GetProjectName()); __printer.WriteTemplateOutput("</project>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </projects>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <buildSpec>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <buildCommand>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <name>org.eclipse.wst.common.project.facet.core.builder</name>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <arguments>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </arguments>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </buildCommand>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <buildCommand>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <name>org.eclipse.wst.validation.validationbuilder</name>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <arguments>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </arguments>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </buildCommand>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </buildSpec>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <natures>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <nature>org.eclipse.wst.common.project.facet.core.nature</nature>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </natures>"); __printer.WriteLine(); __printer.WriteTemplateOutput("</projectDescription>"); __printer.WriteLine(); } return __result; }
public List<string> Generated_Generate_policy_attachments() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>"); __printer.WriteLine(); __printer.WriteTemplateOutput("<psa:PolicySetAttachment xmlns:psa=\"http://www.ibm.com/xmlns/prod/websphere/200605/policysetattachment\" xmlns:ps=\"http://www.ibm.com/xmlns/prod/websphere/200605/policyset\">"); __printer.WriteLine(); int __loop1_iteration = 0; var __loop1_result = (from __loop1_tmp_item___noname1 in EnumerableExtensions.Enumerate((Instances).GetEnumerator()) from __loop1_tmp_item_endp in EnumerableExtensions.Enumerate((__loop1_tmp_item___noname1).GetEnumerator()).OfType<Endpoint>() select new { __loop1_item___noname1 = __loop1_tmp_item___noname1, __loop1_item_endp = __loop1_tmp_item_endp, }).ToArray(); foreach (var __loop1_item in __loop1_result) { var __noname1 = __loop1_item.__loop1_item___noname1; var endp = __loop1_item.__loop1_item_endp; ++__loop1_iteration; __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); if (endp.Binding.HasPolicy()) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <psa:PolicySetReference name=\""); __printer.Write(endp.Binding.Name); __printer.WriteTemplateOutput("_Policy\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <psa:PolicySetBinding name=\""); __printer.Write(endp.Binding.Name); __printer.WriteTemplateOutput("_Binding\" scope=\"domain\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <psa:Resource pattern=\"WebService:/"); __printer.Write(Generated_GetProjectName()); __printer.WriteTemplateOutput(".war:{"); __printer.Write(Generated_GetUri(endp.Namespace)); __printer.WriteTemplateOutput("}"); __printer.Write(endp.Name); __printer.WriteTemplateOutput("\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </psa:PolicySetReference>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); } __printer.TrimLine(); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("</psa:PolicySetAttachment>"); __printer.WriteLine(); } return __result; }
public List<string> Generated_Generate_MetaInf_Manifest() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("Manifest-Version: 1.0"); __printer.WriteLine(); __printer.WriteTemplateOutput("Class-Path: "); __printer.WriteLine(); } return __result; }
public List<string> Generated_Generate_jsdtscope() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); __printer.WriteLine(); __printer.WriteTemplateOutput("<classpath>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <classpathentry kind=\"src\" path=\"WebContent\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <classpathentry kind=\"con\" path=\"org.eclipse.wst.jsdt.launching.JRE_CONTAINER\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <classpathentry kind=\"con\" path=\"org.eclipse.wst.jsdt.launching.WebProject\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <attributes>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <attribute name=\"hide\" value=\"true\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </attributes>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </classpathentry>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <classpathentry kind=\"con\" path=\"org.eclipse.wst.jsdt.launching.baseBrowserLibrary\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <classpathentry kind=\"output\" path=\"\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput("</classpath>"); __printer.WriteLine(); } return __result; }
public OsloCodeGeneratorPrintProcessor(OsloCodeGeneratorInfo rootCodeGenerator, OsloCodeGeneratorInfo codeGenerator) { this.rootCodeGenerator = rootCodeGenerator; this.codeGenerator = codeGenerator; this.CodePrinter = this.rootCodeGenerator.CodePrinter; if (this.codeGenerator != null && this.codeGenerator.FileName != null) { this.fileName = Path.GetFileName(this.codeGenerator.FileName); } this.loopStack = new Stack<LoopScope>(); this.nameStack = new Stack<NameScope>(); this.functionNames = new NameScope(); this.functionCounter = 0; }
public List<string> Generated_GenerateClientProject() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("<?xml version=\"1.0\" encoding=\"utf-8\"?>"); __printer.WriteLine(); __printer.WriteTemplateOutput("<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <PropertyGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Platform Condition=\" '$(Platform)' == '' \">x86</Platform>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <ProductVersion>8.0.30703</ProductVersion>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <SchemaVersion>2.0</SchemaVersion>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <ProjectGuid>{25817C9A-811D-4D02-B475-927904A404FD}</ProjectGuid>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <OutputType>Exe</OutputType>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <AppDesignerFolder>Properties</AppDesignerFolder>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <RootNamespace>"); __printer.Write(Properties.ProjectName); __printer.WriteTemplateOutput("Client</RootNamespace>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <AssemblyName>"); __printer.Write(Properties.ProjectName); __printer.WriteTemplateOutput("Client</AssemblyName>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <TargetFrameworkProfile>Client</TargetFrameworkProfile>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <FileAlignment>512</FileAlignment>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </PropertyGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|x86' \">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <PlatformTarget>x86</PlatformTarget>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <DebugSymbols>true</DebugSymbols>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <DebugType>full</DebugType>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Optimize>false</Optimize>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <OutputPath>bin\\Debug\\</OutputPath>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <DefineConstants>DEBUG;TRACE</DefineConstants>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <ErrorReport>prompt</ErrorReport>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <WarningLevel>4</WarningLevel>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </PropertyGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|x86' \">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <PlatformTarget>x86</PlatformTarget>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <DebugType>pdbonly</DebugType>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Optimize>true</Optimize>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <OutputPath>bin\\Release\\</OutputPath>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <DefineConstants>TRACE</DefineConstants>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <ErrorReport>prompt</ErrorReport>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <WarningLevel>4</WarningLevel>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </PropertyGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <ItemGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"Microsoft.CSharp\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Web.DynamicData\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Web.Entity\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Web.ApplicationServices\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Configuration\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Core\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Data\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Drawing\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.EnterpriseServices\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Runtime.Serialization\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.ServiceModel\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.ServiceModel.Web\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Web\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Web.Extensions\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Web.Services\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Xml\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Xml.Linq\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </ItemGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <ItemGroup>"); __printer.WriteLine(); int __loop2_iteration = 0; var __loop2_result = (from __loop2_tmp_item___noname2 in EnumerableExtensions.Enumerate((Instances).GetEnumerator()) from __loop2_tmp_item_ns in EnumerableExtensions.Enumerate((__loop2_tmp_item___noname2).GetEnumerator()).OfType<Namespace>() select new { __loop2_item___noname2 = __loop2_tmp_item___noname2, __loop2_item_ns = __loop2_tmp_item_ns, }).ToArray(); foreach (var __loop2_item in __loop2_result) { var __noname2 = __loop2_item.__loop2_item___noname2; var ns = __loop2_item.__loop2_item_ns; ++__loop2_iteration; __printer.TrimLine(); __printer.WriteLine(); if (ns.HasDeclarations()) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Compile Include=\""); __printer.Write(ns.FullName); __printer.WriteTemplateOutput(".cs\" />"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Compile Include=\"Program.cs\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Compile Include=\"Properties\\AssemblyInfo.cs\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </ItemGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <ItemGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <None Include=\"App.config\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <SubType>Designer</SubType>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </None>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </ItemGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <!-- To modify your build process, add your task inside one of the targets below and uncomment it. "); __printer.WriteLine(); __printer.WriteTemplateOutput(" Other similar extension points exist, see Microsoft.Common.targets."); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Target Name=\"BeforeBuild\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </Target>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Target Name=\"AfterBuild\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </Target>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" -->"); __printer.WriteLine(); __printer.WriteTemplateOutput("</Project>"); __printer.WriteLine(); } return __result; }
public List<string> Generated_Generate_service_policy_prefs_ear() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("org.eclipse.wst.ws.service.policy.projectEnabled=false"); __printer.WriteLine(); __printer.WriteTemplateOutput("com.ibm.ast.ws.jaxws.annotations.v7.jaxws.default.value.key=com.ibm.ast.ws.jaxws.annotations.v7.default"); __printer.WriteLine(); __printer.WriteTemplateOutput("eclipse.preferences.version=1"); __printer.WriteLine(); } return __result; }
public List<string> Generated_GenerateServerProject() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("<?xml version=\"1.0\" encoding=\"utf-8\"?>"); __printer.WriteLine(); __printer.WriteTemplateOutput("<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <PropertyGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <ProductVersion>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </ProductVersion>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <SchemaVersion>2.0</SchemaVersion>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <ProjectGuid>{33796CD6-1826-4543-8802-EADFCA82243A}</ProjectGuid>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <OutputType>Library</OutputType>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <AppDesignerFolder>Properties</AppDesignerFolder>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <RootNamespace>"); __printer.Write(Properties.ProjectName); __printer.WriteTemplateOutput("</RootNamespace>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <AssemblyName>"); __printer.Write(Properties.ProjectName); __printer.WriteTemplateOutput("</AssemblyName>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <WcfConfigValidationEnabled>True</WcfConfigValidationEnabled>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <UseIISExpress>true</UseIISExpress>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <IISExpressSSLPort />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <IISExpressAnonymousAuthentication />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <IISExpressWindowsAuthentication />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <IISExpressUseClassicPipelineMode />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <UseGlobalApplicationHostFile />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </PropertyGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <DebugSymbols>true</DebugSymbols>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <DebugType>full</DebugType>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Optimize>false</Optimize>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <OutputPath>bin\\</OutputPath>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <DefineConstants>DEBUG;TRACE</DefineConstants>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <ErrorReport>prompt</ErrorReport>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <WarningLevel>4</WarningLevel>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </PropertyGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <DebugType>pdbonly</DebugType>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Optimize>true</Optimize>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <OutputPath>bin\\</OutputPath>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <DefineConstants>TRACE</DefineConstants>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <ErrorReport>prompt</ErrorReport>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <WarningLevel>4</WarningLevel>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </PropertyGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <ItemGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"Microsoft.CSharp\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Web.DynamicData\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Web.Entity\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Web.ApplicationServices\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Configuration\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Core\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Data\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Drawing\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.EnterpriseServices\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Runtime.Serialization\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.ServiceModel\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.ServiceModel.Web\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Web\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Web.Extensions\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Web.Services\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Xml\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Reference Include=\"System.Xml.Linq\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </ItemGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <ItemGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Folder Include=\"App_Data\\\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Folder Include=\"Properties\\\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </ItemGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <ItemGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Content Include=\"About.aspx\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Content Include=\"Account\\ChangePassword.aspx\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Content Include=\"Account\\ChangePasswordSuccess.aspx\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Content Include=\"Default.aspx\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Content Include=\"Global.asax\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Content Include=\"Services\\Default.aspx\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); int __loop3_iteration = 0; var __loop3_result = (from __loop3_tmp_item___noname3 in EnumerableExtensions.Enumerate((Instances).GetEnumerator()) from __loop3_tmp_item_endp in EnumerableExtensions.Enumerate((__loop3_tmp_item___noname3).GetEnumerator()).OfType<Endpoint>() select new { __loop3_item___noname3 = __loop3_tmp_item___noname3, __loop3_item_endp = __loop3_tmp_item_endp, }).ToArray(); foreach (var __loop3_item in __loop3_result) { var __noname3 = __loop3_item.__loop3_item___noname3; var endp = __loop3_item.__loop3_item_endp; ++__loop3_iteration; __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Content Include=\"Services\\"); __printer.Write(endp.Name); __printer.WriteTemplateOutput(".svc\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Content Include=\"Styles\\Site.css\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <None Include=\"Scripts\\jquery-1.4.1-vsdoc.js\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Content Include=\"Scripts\\jquery-1.4.1.js\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Content Include=\"Scripts\\jquery-1.4.1.min.js\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Content Include=\"Services\\Web.config\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Content Include=\"Site.master\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Content Include=\"web.config\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <None Include=\"web.Debug.config\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <DependentUpon>web.config</DependentUpon>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </None>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <None Include=\"web.Release.config\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <DependentUpon>web.config</DependentUpon>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </None>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </ItemGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <ItemGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Compile Include=\"About.aspx.cs\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <DependentUpon>About.aspx</DependentUpon>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <SubType>ASPXCodeBehind</SubType>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </Compile>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Compile Include=\"Account\\ChangePassword.aspx.cs\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <DependentUpon>ChangePassword.aspx</DependentUpon>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <SubType>ASPXCodeBehind</SubType>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </Compile>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Compile Include=\"Account\\ChangePasswordSuccess.aspx.cs\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <DependentUpon>ChangePasswordSuccess.aspx</DependentUpon>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <SubType>ASPXCodeBehind</SubType>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </Compile>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Compile Include=\"Default.aspx.cs\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <DependentUpon>Default.aspx</DependentUpon>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <SubType>ASPXCodeBehind</SubType>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </Compile>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Compile Include=\"Services\\Default.aspx.cs\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <DependentUpon>Default.aspx</DependentUpon>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <SubType>ASPXCodeBehind</SubType>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </Compile>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Compile Include=\"Site.master.cs\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <DependentUpon>Site.master</DependentUpon>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <SubType>ASPXCodeBehind</SubType>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </Compile>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); int __loop4_iteration = 0; var __loop4_result = (from __loop4_tmp_item___noname4 in EnumerableExtensions.Enumerate((Instances).GetEnumerator()) from __loop4_tmp_item_ns in EnumerableExtensions.Enumerate((__loop4_tmp_item___noname4).GetEnumerator()).OfType<Namespace>() select new { __loop4_item___noname4 = __loop4_tmp_item___noname4, __loop4_item_ns = __loop4_tmp_item_ns, }).ToArray(); foreach (var __loop4_item in __loop4_result) { var __noname4 = __loop4_item.__loop4_item___noname4; var ns = __loop4_item.__loop4_item_ns; ++__loop4_iteration; __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); if (ns.HasDeclarations()) { __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Compile Include=\"App_Code\\"); __printer.Write(ns.FullName); __printer.WriteTemplateOutput(".cs\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); int __loop5_iteration = 0; var __loop5_result = (from __loop5_tmp_item___noname5 in EnumerableExtensions.Enumerate((Instances).GetEnumerator()) from __loop5_tmp_item_intf in EnumerableExtensions.Enumerate((__loop5_tmp_item___noname5).GetEnumerator()).OfType<Interface>() select new { __loop5_item___noname5 = __loop5_tmp_item___noname5, __loop5_item_intf = __loop5_tmp_item_intf, }).ToArray(); foreach (var __loop5_item in __loop5_result) { var __noname5 = __loop5_item.__loop5_item___noname5; var intf = __loop5_item.__loop5_item_intf; ++__loop5_iteration; __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Compile Include=\"App_Code\\"); __printer.Write(intf.Name); __printer.WriteTemplateOutput(".cs\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); int __loop6_iteration = 0; var __loop6_result = (from __loop6_tmp_item___noname6 in EnumerableExtensions.Enumerate((Instances).GetEnumerator()) from __loop6_tmp_item_endp in EnumerableExtensions.Enumerate((__loop6_tmp_item___noname6).GetEnumerator()).OfType<Endpoint>() select new { __loop6_item___noname6 = __loop6_tmp_item___noname6, __loop6_item_endp = __loop6_tmp_item_endp, }).ToArray(); foreach (var __loop6_item in __loop6_result) { var __noname6 = __loop6_item.__loop6_item___noname6; var endp = __loop6_item.__loop6_item_endp; ++__loop6_iteration; __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Compile Include=\"App_Code\\"); __printer.Write(endp.Name); __printer.WriteTemplateOutput(".cs\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Compile Include=\"App_Code\\"); __printer.Write(endp.Name); __printer.WriteTemplateOutput("Client.cs\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" </ItemGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <ItemGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Content Include=\"Account\\Web.config\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </ItemGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <ItemGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Content Include=\"Clients\\App.config\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </ItemGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <PropertyGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <VisualStudioVersion Condition=\"'$(VisualStudioVersion)' == ''\">10.0</VisualStudioVersion>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <VSToolsPath Condition=\"'$(VSToolsPath)' == ''\">$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v$(VisualStudioVersion)</VSToolsPath>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </PropertyGroup>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Import Project=\"$(MSBuildBinPath)\\Microsoft.CSharp.targets\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Import Project=\"$(VSToolsPath)\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"'$(VSToolsPath)' != ''\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Import Project=\"$(MSBuildExtensionsPath32)\\Microsoft\\VisualStudio\\v10.0\\WebApplications\\Microsoft.WebApplication.targets\" Condition=\"false\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <ProjectExtensions>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <VisualStudio>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <FlavorProperties GUID=\"{349c5851-65df-11da-9384-00065b846f21}\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <WebProjectProperties>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <UseIIS>True</UseIIS>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <AutoAssignPort>True</AutoAssignPort>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <DevelopmentServerPort>54307</DevelopmentServerPort>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <DevelopmentServerVPath>/</DevelopmentServerVPath>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <IISUrl>http://localhost:54307/</IISUrl>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <NTLMAuthentication>False</NTLMAuthentication>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <UseCustomServer>False</UseCustomServer>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <CustomServerUrl>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </CustomServerUrl>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </WebProjectProperties>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </FlavorProperties>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </VisualStudio>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </ProjectExtensions>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <!-- To modify your build process, add your task inside one of the targets below and uncomment it. "); __printer.WriteLine(); __printer.WriteTemplateOutput(" Other similar extension points exist, see Microsoft.Common.targets."); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Target Name=\"BeforeBuild\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </Target>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <Target Name=\"AfterBuild\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </Target>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" -->"); __printer.WriteLine(); __printer.WriteTemplateOutput("</Project>"); __printer.WriteLine(); } return __result; }
public List<string> Generated_Generate_superType_container() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("org.eclipse.wst.jsdt.launching.baseBrowserLibrary"); __printer.WriteLine(); } return __result; }
public List<string> Generated_GenerateServicesDefaultAspx() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("<%@ Page Title=\"Services Home Page\" Language=\"C#\" MasterPageFile=\"~/Site.master\" AutoEventWireup=\"true\""); __printer.WriteLine(); __printer.WriteTemplateOutput(" CodeFile=\"~/Services/Default.aspx.cs\" Inherits=\"Services._Default\" %>"); __printer.WriteLine(); __printer.WriteTemplateOutput("<asp:Content ID=\"HeaderContent\" runat=\"server\" ContentPlaceHolderID=\"HeadContent\">"); __printer.WriteLine(); __printer.WriteTemplateOutput("</asp:Content>"); __printer.WriteLine(); __printer.WriteTemplateOutput("<asp:Content ID=\"BodyContent\" runat=\"server\" ContentPlaceHolderID=\"MainContent\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <h2>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" Services"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </h2>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <p>"); __printer.WriteLine(); int __loop1_iteration = 0; int id = 1; var __loop1_result = (from __loop1_tmp_item___noname1 in EnumerableExtensions.Enumerate((Instances).GetEnumerator()) from __loop1_tmp_item_endpoint in EnumerableExtensions.Enumerate((__loop1_tmp_item___noname1).GetEnumerator()).OfType<Endpoint>() select new { __loop1_item___noname1 = __loop1_tmp_item___noname1, __loop1_item_endpoint = __loop1_tmp_item_endpoint, }).ToArray(); foreach (var __loop1_item in __loop1_result) { var __noname1 = __loop1_item.__loop1_item___noname1; var endpoint = __loop1_item.__loop1_item_endpoint; ++__loop1_iteration; if (__loop1_iteration >= 2) { id = id + 1; } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <asp:HyperLink ID=\"HyperLink"); __printer.Write(id); __printer.WriteTemplateOutput("\" runat=\"server\" NavigateUrl=\"~/Services/"); __printer.Write(endpoint.Name); __printer.WriteTemplateOutput(".svc\">"); __printer.Write(endpoint.Name); __printer.WriteTemplateOutput("</asp:HyperLink><br/>"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" </p>"); __printer.WriteLine(); __printer.WriteTemplateOutput("</asp:Content>"); __printer.WriteLine(); } return __result; }
public List<string> Generated_Generate_superType_name() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("Window"); __printer.WriteLine(); } return __result; }
public List<string> Generated_GenerateSolution() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("Microsoft Visual Studio Solution File, Format Version 11.00"); __printer.WriteLine(); __printer.WriteTemplateOutput("# Visual Studio 2010"); __printer.WriteLine(); __printer.WriteTemplateOutput("Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \""); __printer.Write(Properties.ProjectName); __printer.WriteTemplateOutput("Client\", \""); __printer.Write(Properties.ProjectName); __printer.WriteTemplateOutput("Client\\"); __printer.Write(Properties.ProjectName); __printer.WriteTemplateOutput("Client.csproj\", \"{25817C9A-811D-4D02-B475-927904A404FD}\""); __printer.WriteLine(); __printer.WriteTemplateOutput("EndProject"); __printer.WriteLine(); __printer.WriteTemplateOutput("Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"VSProj\", \"VSProj\\VSProj.csproj\", \"{33796CD6-1826-4543-8802-EADFCA82243A}\""); __printer.WriteLine(); __printer.WriteTemplateOutput("EndProject"); __printer.WriteLine(); __printer.WriteTemplateOutput("Global"); __printer.WriteLine(); __printer.WriteTemplateOutput(" GlobalSection(SolutionConfigurationPlatforms) = preSolution"); __printer.WriteLine(); __printer.WriteTemplateOutput(" Debug|x86 = Debug|x86"); __printer.WriteLine(); __printer.WriteTemplateOutput(" Release|x86 = Release|x86"); __printer.WriteLine(); __printer.WriteTemplateOutput(" EndGlobalSection"); __printer.WriteLine(); __printer.WriteTemplateOutput(" GlobalSection(ProjectConfigurationPlatforms) = postSolution"); __printer.WriteLine(); __printer.WriteTemplateOutput(" {25817C9A-811D-4D02-B475-927904A404FD}.Debug|x86.ActiveCfg = Debug|x86"); __printer.WriteLine(); __printer.WriteTemplateOutput(" {25817C9A-811D-4D02-B475-927904A404FD}.Debug|x86.Build.0 = Debug|x86"); __printer.WriteLine(); __printer.WriteTemplateOutput(" {25817C9A-811D-4D02-B475-927904A404FD}.Release|x86.ActiveCfg = Release|x86"); __printer.WriteLine(); __printer.WriteTemplateOutput(" {25817C9A-811D-4D02-B475-927904A404FD}.Release|x86.Build.0 = Release|x86"); __printer.WriteLine(); __printer.WriteTemplateOutput(" EndGlobalSection"); __printer.WriteLine(); __printer.WriteTemplateOutput(" GlobalSection(SolutionProperties) = preSolution"); __printer.WriteLine(); __printer.WriteTemplateOutput(" HideSolutionNode = FALSE"); __printer.WriteLine(); __printer.WriteTemplateOutput(" EndGlobalSection"); __printer.WriteLine(); __printer.WriteTemplateOutput("EndGlobal"); __printer.WriteLine(); } return __result; }
public List<string> Generated_Generate_web_xml() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); __printer.WriteLine(); __printer.WriteTemplateOutput("<web-app"); __printer.WriteLine(); __printer.WriteTemplateOutput(" version=\"2.5\" xmlns=\"http://java.sun.com/xml/ns/javaee\" "); __printer.WriteLine(); __printer.WriteTemplateOutput(" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "); __printer.WriteLine(); __printer.WriteTemplateOutput(" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd\">"); __printer.WriteLine(); __printer.WriteTemplateOutput("</web-app>"); __printer.WriteLine(); } return __result; }
public List<string> Generated_GenerateBehaviors() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("<behaviors>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <serviceBehaviors>"); __printer.WriteLine(); int __loop7_iteration = 0; var __loop7_result = (from __loop7_tmp_item___noname7 in EnumerableExtensions.Enumerate((Instances).GetEnumerator()) from __loop7_tmp_item_endpoint in EnumerableExtensions.Enumerate((__loop7_tmp_item___noname7).GetEnumerator()).OfType<Endpoint>() select new { __loop7_item___noname7 = __loop7_tmp_item___noname7, __loop7_item_endpoint = __loop7_tmp_item_endpoint, }).ToArray(); foreach (var __loop7_item in __loop7_result) { var __noname7 = __loop7_item.__loop7_item___noname7; var endpoint = __loop7_item.__loop7_item_endpoint; ++__loop7_iteration; __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <behavior name=\""); __printer.Write(endpoint.Name); __printer.WriteTemplateOutput("Behavior\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <dataContractSerializer maxItemsInObjectGraph=\"2147483647\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <serviceMetadata httpGetEnabled=\"true\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <serviceDebug includeExceptionDetailInFaults=\"false\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); int __loop8_iteration = 0; var __loop8_result = (from __loop8_tmp_item___noname8 in EnumerableExtensions.Enumerate((endpoint).GetEnumerator()) from __loop8_tmp_item_binding in EnumerableExtensions.Enumerate((__loop8_tmp_item___noname8.Binding).GetEnumerator()) select new { __loop8_item___noname8 = __loop8_tmp_item___noname8, __loop8_item_binding = __loop8_tmp_item_binding, }).ToArray(); foreach (var __loop8_item in __loop8_result) { var __noname8 = __loop8_item.__loop8_item___noname8; var binding = __loop8_item.__loop8_item_binding; ++__loop8_iteration; __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); int __loop9_iteration = 0; var __loop9_result = (from __loop9_tmp_item___noname9 in EnumerableExtensions.Enumerate((binding).GetEnumerator()) from __loop9_tmp_item_Protocols in EnumerableExtensions.Enumerate((__loop9_tmp_item___noname9.Protocols).GetEnumerator()) from __loop9_tmp_item_security in EnumerableExtensions.Enumerate((__loop9_tmp_item_Protocols).GetEnumerator()).OfType<SecurityProtocolBindingElement>() select new { __loop9_item___noname9 = __loop9_tmp_item___noname9, __loop9_item_Protocols = __loop9_tmp_item_Protocols, __loop9_item_security = __loop9_tmp_item_security, }).ToArray(); foreach (var __loop9_item in __loop9_result) { var __noname9 = __loop9_item.__loop9_item___noname9; var Protocols = __loop9_item.__loop9_item_Protocols; var security = __loop9_item.__loop9_item_security; ++__loop9_iteration; __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <serviceCredentials>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <serviceCertificate storeLocation=\"LocalMachine\" storeName=\"My\" x509FindType=\"FindBySubjectName\" findValue=\"WspService\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <clientCertificate>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <authentication certificateValidationMode=\"PeerOrChainTrust\" trustedStoreLocation=\"LocalMachine\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </clientCertificate>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </serviceCredentials>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" </behavior>"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" </serviceBehaviors>"); __printer.WriteLine(); __printer.WriteTemplateOutput("</behaviors>"); __printer.WriteLine(); } return __result; }
public List<string> Generated_Generate_ws_policy_service_control() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>"); __printer.WriteLine(); __printer.WriteTemplateOutput("<ns2:WSPolicyServiceControl xmlns:ns2=\"http://www.ibm.com/xmlns/prod/websphere/200709/WSPolicyServiceControl\" Version=\"1.0\"/>"); __printer.WriteLine(); } return __result; }
public List<string> Generated_GenerateClientEndpoints() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("<client>"); __printer.WriteLine(); int __loop14_iteration = 0; var __loop14_result = (from __loop14_tmp_item___noname14 in EnumerableExtensions.Enumerate((Instances).GetEnumerator()) from __loop14_tmp_item_endpoint in EnumerableExtensions.Enumerate((__loop14_tmp_item___noname14).GetEnumerator()).OfType<Endpoint>() select new { __loop14_item___noname14 = __loop14_tmp_item___noname14, __loop14_item_endpoint = __loop14_tmp_item_endpoint, }).ToArray(); foreach (var __loop14_item in __loop14_result) { var __noname14 = __loop14_item.__loop14_item___noname14; var endpoint = __loop14_item.__loop14_item_endpoint; ++__loop14_iteration; __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <endpoint name=\""); __printer.Write(endpoint.Interface.Namespace.FullName); __printer.WriteTemplateOutput("."); __printer.Write(endpoint.Name); __printer.WriteTemplateOutput("\" contract=\""); __printer.Write(endpoint.Interface.Namespace.FullName); __printer.WriteTemplateOutput("."); __printer.Write(endpoint.Interface.Name); __printer.WriteTemplateOutput("\" binding=\"customBinding\" bindingConfiguration=\""); __printer.Write(endpoint.Binding.Name); __printer.WriteTemplateOutput("\" behaviorConfiguration=\""); __printer.Write(endpoint.Name); __printer.WriteTemplateOutput("Behavior\" address=\""); __printer.Write(endpoint.Address.Uri); __printer.WriteTemplateOutput("\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); int __loop15_iteration = 0; var __loop15_result = (from __loop15_tmp_item___noname15 in EnumerableExtensions.Enumerate((endpoint).GetEnumerator()) from __loop15_tmp_item_binding in EnumerableExtensions.Enumerate((__loop15_tmp_item___noname15.Binding).GetEnumerator()) select new { __loop15_item___noname15 = __loop15_tmp_item___noname15, __loop15_item_binding = __loop15_tmp_item_binding, }).ToArray(); foreach (var __loop15_item in __loop15_result) { var __noname15 = __loop15_item.__loop15_item___noname15; var binding = __loop15_item.__loop15_item_binding; ++__loop15_iteration; __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); int __loop16_iteration = 0; var __loop16_result = (from __loop16_tmp_item___noname16 in EnumerableExtensions.Enumerate((binding).GetEnumerator()) from __loop16_tmp_item_Protocols in EnumerableExtensions.Enumerate((__loop16_tmp_item___noname16.Protocols).GetEnumerator()) from __loop16_tmp_item_security in EnumerableExtensions.Enumerate((__loop16_tmp_item_Protocols).GetEnumerator()).OfType<SecurityProtocolBindingElement>() select new { __loop16_item___noname16 = __loop16_tmp_item___noname16, __loop16_item_Protocols = __loop16_tmp_item_Protocols, __loop16_item_security = __loop16_tmp_item_security, }).ToArray(); foreach (var __loop16_item in __loop16_result) { var __noname16 = __loop16_item.__loop16_item___noname16; var Protocols = __loop16_item.__loop16_item_Protocols; var security = __loop16_item.__loop16_item_security; ++__loop16_iteration; __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <identity>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <dns value=\"WspService\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </identity>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" "); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" </endpoint>"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("</client>"); __printer.WriteLine(); } return __result; }
public List<string> Generated_Generate_common_component() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("<?xml version=\"1.0\" encoding=\"UTF-8\"?><project-modules id=\"moduleCoreId\" project-version=\"1.5.0\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <wb-module deploy-name=\""); __printer.Write(Generated_GetProjectName()); __printer.WriteTemplateOutput("\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <wb-resource deploy-path=\"/\" source-path=\"/WebContent\" tag=\"defaultRootSource\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <wb-resource deploy-path=\"/WEB-INF/classes\" source-path=\"/src\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <wb-resource deploy-path=\"/WEB-INF/classes\" source-path=\"/.apt_generated\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <property name=\"context-root\" value=\""); __printer.Write(Generated_GetProjectName()); __printer.WriteTemplateOutput("\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <property name=\"java-output-path\" value=\"/"); __printer.Write(Generated_GetProjectName()); __printer.WriteTemplateOutput("/WebContent/WEB-INF/classes\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </wb-module>"); __printer.WriteLine(); __printer.WriteTemplateOutput("</project-modules>"); __printer.WriteLine(); } return __result; }
public List<string> Generated_GenerateServices() { List<string> __result = new List<string>(); using(TemplatePrinter __printer = new TemplatePrinter(__result)) { __printer.WriteTemplateOutput("<services>"); __printer.WriteLine(); int __loop13_iteration = 0; var __loop13_result = (from __loop13_tmp_item___noname13 in EnumerableExtensions.Enumerate((Instances).GetEnumerator()) from __loop13_tmp_item_endpoint in EnumerableExtensions.Enumerate((__loop13_tmp_item___noname13).GetEnumerator()).OfType<Endpoint>() select new { __loop13_item___noname13 = __loop13_tmp_item___noname13, __loop13_item_endpoint = __loop13_tmp_item_endpoint, }).ToArray(); foreach (var __loop13_item in __loop13_result) { var __noname13 = __loop13_item.__loop13_item___noname13; var endpoint = __loop13_item.__loop13_item_endpoint; ++__loop13_iteration; __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput(" <service behaviorConfiguration=\""); __printer.Write(endpoint.Name); __printer.WriteTemplateOutput("Behavior\" name=\""); __printer.Write(endpoint.Interface.Namespace.FullName); __printer.WriteTemplateOutput("."); __printer.Write(endpoint.Name); __printer.WriteTemplateOutput("\">"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <endpoint binding=\"customBinding\" bindingConfiguration=\""); __printer.Write(endpoint.Binding.Name); __printer.WriteTemplateOutput("\" contract=\""); __printer.Write(endpoint.Interface.Namespace.FullName); __printer.WriteTemplateOutput("."); __printer.Write(endpoint.Interface.Name); __printer.WriteTemplateOutput("\"/>"); __printer.WriteLine(); __printer.WriteTemplateOutput(" <endpoint address=\"mex\" binding=\"mexHttpBinding\" contract=\"IMetadataExchange\" />"); __printer.WriteLine(); __printer.WriteTemplateOutput(" </service>"); __printer.WriteLine(); } __printer.TrimLine(); __printer.WriteLine(); __printer.WriteTemplateOutput("</services>"); __printer.WriteLine(); } return __result; }
public void GenerateTemporaryCode(TemplatePrinter output, ProgressDelegate progress = null) { this.CodePrinter = output; this.progress = progress; if (this.NamespaceName == null) this.NamespaceName = "TemporaryNamespace"; if (this.ClassName == null) this.ClassName = "TemporaryGenerator"; if (this.InstancesType == null) this.InstancesType = "List<object>"; if (this.ContextType == null) this.ContextType = "GeneratorContext"; foreach (string usingName in this.Usings) { this.CodePrinter.WriteLine("using {0};", usingName); } this.CodePrinter.ForcedWriteLine(); this.CodePrinter.WriteLine("namespace {0}", this.NamespaceName); this.CodePrinter.WriteLine("{"); this.CodePrinter.AppendIndent(" "); if (this.HasMainFunction) { this.CodePrinter.WriteLine("// The main file of the generator."); this.CodePrinter.WriteLine("public partial class {0} : Generator<{1}, {2}>", this.ClassName, this.InstancesType, this.ContextType); this.CodePrinter.WriteLine("{"); this.CodePrinter.AppendIndent(" "); foreach (string import in this.Imports) { this.CodePrinter.Write("public {0} {0}", import); this.CodePrinter.WriteLine(" { get; private set; }"); } this.CodePrinter.ForcedWriteLine(); this.CodePrinter.WriteLine("public {0}({1} instances, {2} context)", this.ClassName, this.InstancesType, this.ContextType); this.CodePrinter.WriteLine(" : base(instances, context)"); this.CodePrinter.WriteLine("{"); this.CodePrinter.AppendIndent(" "); if (this.PropertiesName != null) { this.CodePrinter.WriteLine("this.{0} = new PropertyGroup_{0}();", this.PropertiesName); } foreach (string import in this.Imports) { this.CodePrinter.WriteLine("this.{0} = new {0}(instances, context);", import); } this.CodePrinter.ResetIndent(); this.CodePrinter.WriteLine("}"); this.CodePrinter.ForcedWriteLine(); } else { this.CodePrinter.WriteLine("// Inheritace from 'Generator<{0}, {1}>' and constructor is only generated into the main file.", this.InstancesType, this.ContextType); this.CodePrinter.WriteLine("public partial class {0}", this.ClassName, this.InstancesType, this.ContextType); this.CodePrinter.WriteLine("{"); this.CodePrinter.AppendIndent(" "); } this.CodePrinter.WriteLine(); foreach (OsloCodeGeneratorInfo codeGenerator in this.Includes) { this.CodePrinter.AppendIndent(" "); this.CodePrinter.WriteLine("#region functions from \"{0}\"", codeGenerator.FileName); this.CodePrinter.WriteLine(); OsloCodeGeneratorPrintProcessor ocgpp = new OsloCodeGeneratorPrintProcessor(this, codeGenerator); ocgpp.Process(codeGenerator.Program); /*if (codeGenerator == this && !this.IgnoreIncludes && !this.HasMainFunction) { this.ErrorReporter.Error("Missing 'void Main()' function in {0}.", this.FileName); }*/ this.CodePrinter.WriteLine(); this.CodePrinter.WriteLine("#endregion"); } this.CodePrinter.ResetIndent(); this.CodePrinter.WriteLine("}"); this.CodePrinter.ResetIndent(); this.CodePrinter.WriteLine("}"); }