コード例 #1
0
ファイル: VoiceConnector.cs プロジェクト: RavenB/gridsearch
 /// <summary>
 /// This is used to initialize and stop the Connector as a whole. The Connector
 /// Create call must be completed successfully before any other requests are made
 /// (typically during application initialization). The shutdown should be called
 /// when the application is shutting down to gracefully release resources
 /// </summary>
 /// <param name="ClientName">A string value indicting the Application name</param>
 /// <param name="AccountManagementServer">URL for the management server</param>
 /// <param name="Logging">LoggingSettings</param>
 public int ConnectorCreate(string ClientName, string AccountManagementServer, ushort MinimumPort,
     ushort MaximumPort, VoiceLoggingSettings Logging)
 {
     StringBuilder sb = new StringBuilder();
     sb.Append(VoiceGateway.MakeXML("ClientName", ClientName));
     sb.Append(VoiceGateway.MakeXML("AccountManagementServer", AccountManagementServer));
     sb.Append(VoiceGateway.MakeXML("MinimumPort", MinimumPort.ToString()));
     sb.Append(VoiceGateway.MakeXML("MaximumPort", MaximumPort.ToString()));
     sb.Append("<Logging>");
     sb.Append(VoiceGateway.MakeXML("Enabled", Logging.Enabled ? "true" : "false"));
     sb.Append(VoiceGateway.MakeXML("Folder", Logging.Folder));
     sb.Append(VoiceGateway.MakeXML("FileNamePrefix", Logging.FileNamePrefix));
     sb.Append(VoiceGateway.MakeXML("FileNameSuffix", Logging.FileNameSuffix));
     sb.Append(VoiceGateway.MakeXML("LogLevel", Logging.LogLevel.ToString()));
     sb.Append("</Logging>");
     return Request("Connector.Create.1", sb.ToString());
 }
コード例 #2
0
        /// <summary>
        /// This is used to initialize and stop the Connector as a whole. The Connector
        /// Create call must be completed successfully before any other requests are made
        /// (typically during application initialization). The shutdown should be called
        /// when the application is shutting down to gracefully release resources
        /// </summary>
        /// <param name="ClientName">A string value indicting the Application name</param>
        /// <param name="AccountManagementServer">URL for the management server</param>
        /// <param name="Logging">LoggingSettings</param>
        /// <param name="MaximumPort"></param>
        /// <param name="MinimumPort"></param>
        public int ConnectorCreate(string ClientName, string AccountManagementServer, ushort MinimumPort,
                                   ushort MaximumPort, VoiceLoggingSettings Logging)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append(VoiceGateway.MakeXML("ClientName", ClientName));
            sb.Append(VoiceGateway.MakeXML("AccountManagementServer", AccountManagementServer));
            sb.Append(VoiceGateway.MakeXML("MinimumPort", MinimumPort.ToString()));
            sb.Append(VoiceGateway.MakeXML("MaximumPort", MaximumPort.ToString()));
            sb.Append("<Logging>");
            sb.Append(VoiceGateway.MakeXML("Enabled", Logging.Enabled ? "true" : "false"));
            sb.Append(VoiceGateway.MakeXML("Folder", Logging.Folder));
            sb.Append(VoiceGateway.MakeXML("FileNamePrefix", Logging.FileNamePrefix));
            sb.Append(VoiceGateway.MakeXML("FileNameSuffix", Logging.FileNameSuffix));
            sb.Append(VoiceGateway.MakeXML("LogLevel", Logging.LogLevel.ToString()));
            sb.Append("</Logging>");
            return(Request("Connector.Create.1", sb.ToString()));
        }