当前位置: 首页>>代码示例>>C#>>正文


C# Methods.ToString方法代码示例

本文整理汇总了C#中System.Methods.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Methods.ToString方法的具体用法?C# Methods.ToString怎么用?C# Methods.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Methods的用法示例。


在下文中一共展示了Methods.ToString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetResponse

        private static BaseResponse GetResponse(Methods methodCalled, PingRequest ahRequest)
        {
            string className = "SFGWrapper.Heartbeat";
            BaseResponse baseResponse = new BaseResponse();
            try
            {
                using (HeartbeatService svc = new HeartbeatService())
                {
                    svc.Timeout = 20000;
                    svc.Credentials = new System.Net.NetworkCredential(ahRequest.ServiceUsername, ahRequest.ServicePassword);
                    argtype sfgRequest = HeartbeatTranslators.TranslateToSfgRequest(ahRequest);
                    switch (methodCalled)
                    {
                        case Methods.PING:
                            baseResponse = HeartbeatTranslators.Ping(svc.process_wsdl(sfgRequest));
                            break;
                    }
                }
                if (baseResponse == null)
                {
                    baseResponse = new BaseResponse();
                    FatalErrorResponse fatalError = new FatalErrorResponse();
                    baseResponse.TypedResponse = fatalError;
                    baseResponse.Messages.Add(new Message("SFGFatalError"));
                }

            }
            catch (Exception ex)
            {
                baseResponse = new BaseResponse();
                FatalErrorResponse fatalError = new FatalErrorResponse();
                baseResponse.TypedResponse = fatalError;
                Message error = new Message("UnknownException");
                baseResponse.DebugStringLog.Add(ex.TargetSite.Name);
                baseResponse.DebugStringLog.Add(ex.Message);
                baseResponse.DebugStringLog.Add(ex.StackTrace);
                baseResponse.Messages.Add(error);
                EventLogger.LogError(string.Format("{0}.{1}()", new object[] { className, methodCalled.ToString() }),
                    string.Format("Message: {0} \r\nStackTrace: {1}", ex.Message, ex.StackTrace));
            }
            return baseResponse;
        }
开发者ID:0huah0,项目名称:csharp-samples,代码行数:42,代码来源:Heartbeat.cs

示例2: LogEnd

        public void LogEnd(Methods Method, string parameter, string processingTime, string Count, string UserHost)
        {
            switch (Method)
            {
                case Methods.GetVariables:
                case Methods.GetVariablesObject:
                    LogQueryFormatted(
                        Method.ToString(),
                        null,
                        parameter,
                        null,
                        null,
                        processingTime,
                        Count, UserHost);
                    break;
                case Methods.GetSites:
                case Methods.GetSitesObject:
                case Methods.GetSiteInfo:
                case Methods.GetSiteInfoObject:
                    LogQueryFormatted(
                        Method.ToString(),
                        parameter,
                        null,
                        null,
                        null,
                        processingTime,
                        Count, UserHost);
                    break;
                default:
                    LogQueryUnformatted(
                        Method.ToString(),
                        parameter
                        );
                    break;

            }
        }
开发者ID:jirikadlec2,项目名称:hydrodata,代码行数:37,代码来源:CustomLogging.cs

示例3: LogValuesStart

 public void LogValuesStart(Methods Method, string Location, string Variable, string start, string end, string UserHost)
 {
     LogQueryFormatted(
         Method.ToString(),
         Location,
         Variable,
         start,
         end,
         null,
         null, UserHost);
 }
开发者ID:jirikadlec2,项目名称:hydrodata,代码行数:11,代码来源:CustomLogging.cs

示例4: LogValuesEnd

 public void LogValuesEnd(Methods Method, string Location, string Variable, string start, string end, long ProcessingTime, int Count, string UserHost)
 {
     LogQueryFormatted(
         Method.ToString(),
         Location,
         Variable,
         start,
         end,
         ProcessingTime.ToString(),
         Count.ToString(), UserHost);
 }
开发者ID:jirikadlec2,项目名称:hydrodata,代码行数:11,代码来源:CustomLogging.cs

示例5: trvMethods_AfterSelect

 private void trvMethods_AfterSelect(object sender, TreeViewEventArgs e)
 {
     if (!string.IsNullOrEmpty((string)trvMethods.SelectedNode.Tag))
     {
         LoadXml(trvMethods.SelectedNode.Name.ToString());
         _testMethod = (Methods)Convert.ToInt32(trvMethods.SelectedNode.Tag);
         btnExecute.Text = "Test " + _testMethod.ToString();
         btnExecute.Enabled = true;
         btnBrowse.Enabled = true;
     }
     else
     {
         txtDetails.Clear();
         btnExecute.Text = "Test ";
         btnExecute.Enabled = false;
         btnBrowse.Enabled = false;
     }
 }
开发者ID:pkb2917,项目名称:TestWcfDeviceService,代码行数:18,代码来源:TdmDeviceSimulator.cs

示例6: MethodManipulation

 public static void MethodManipulation(REngine engine, Methods method)
 {
     engine.Evaluate(String.Format("Fit <- {0}(tsValue)", method.ToString())); // Fit <- Arima(tsValue)
 }
开发者ID:ashenfern,项目名称:FFCF,代码行数:4,代码来源:RTest.cs

示例7: Operation3

 public ActionResult Operation3(Methods unexpected) {
     return View("Message", (object)(MethodBase.GetCurrentMethod().Name + " Method = " + unexpected.ToString()));
 }
开发者ID:yulObraz,项目名称:Test,代码行数:3,代码来源:TestController.cs

示例8: CreatePostString

        private string CreatePostString(Methods methodName)
        {
            string result = String.Empty;

            switch (methodName)
            {
                case Methods.StartSession:
                    result = MethodHelper.StartSession(_setParam.UserLoginSs, _setParam.UserNameSs, _setParam.UserPasswordSs, "StartSession");
                    break;
                case Methods.CloseSession:
                    result = MethodHelper.CloseSession(_setParam.SessionId, "CloseSession");
                    break;
                case Methods.SetAgreementData:
                    result = MethodHelper.SetAgreementData(_setParam.SessionId, _setParam.MethodsName["SetAgreementData"], GetAgreementItem());
                    break;
                case Methods.SetDocumentDataWithOutBinary:
                    result = MethodHelper.SetDocumentDataWithOutBinary(_setParam.SessionId, _setParam.MethodsName["SetDocumentDataWithOutBinary"], GetDocumentItem());
                    break;
                case Methods.SetDocumentDataWithBinary:
                    string base64String = Util.ConvertImageToBase64Strimg(paramsGridView.Rows[11].Cells[1].Value.ToString());
                    result = MethodHelper.SetDocumentDataWithBinary(_setParam.SessionId, _setParam.MethodsName["SetDocumentDataWithBinary"], GetDocumentItem(),
                            base64String);
                    break;
                case Methods.ActualizeIdDocs:
                    result = MethodHelper.ActualizeIdDocs(_setParam.SessionId, _setParam.MethodsName["ActualizeIdDocs"], GetActualizeDocItem());
                    break;
                case Methods.SetClientData:
                    result = MethodHelper.SetClientData(_setParam.SessionId, _setParam.MethodsName["SetClientData"], GetClientItem());
                    break;
                case Methods.GetDocumentData:
                    result = MethodHelper.GetDocumentData(_setParam.SessionId, _setParam.MethodsName["GetDocumentData"], GetDocumentBinaryItem());
                    break;
                case Methods.SetAccountDataU:
                    result = MethodHelper.SetAccountData(_setParam.SessionId, _setParam.MethodsName["SetAccountDataU"], GetAccountItem());
                    break;
                case Methods.SetClientDataU:
                    result = MethodHelper.SetCorpClientData(_setParam.SessionId, _setParam.MethodsName["SetClientDataU"], GetCorpClientItem());
                    break;
                case Methods.SetAgreementDataU:
                    result = MethodHelper.SetCorpAgreementData(_setParam.SessionId, _setParam.MethodsName["SetAgreementDataU"], GetCorpAgreementItem());
                    break;
                case Methods.SetDictionaryData:
                    result = MethodHelper.SetDictionaryData(_setParam.SessionId, _setParam.MethodsName["SetDictionaryData"], GetBranchItem());
                    break;
                case Methods.GetClientDataSed:
                    result = MethodHelper.GetClientDataSed(_setParam.SessionId, _setParam.MethodsName["GetClientDataSed"], GetClientDataSedItem());
                    break;
                case Methods.GetDocumentMetaDataSed:
                    result = MethodHelper.GetDocumentMetaDataSed(_setParam.SessionId, _setParam.MethodsName["GetDocumentMetaDataSed"], GetDocumentMetaDataSedItem());
                    break;
                case Methods.GetDictionaryDataSed:
                    result = MethodHelper.GetDictionaryDataSed(_setParam.SessionId, _setParam.MethodsName["GetDictionaryDataSed"], GetDictionaryDataSedItem());
                    break;
                case Methods.SetDocumentAttributesSed:
                    result = MethodHelper.SetDocumentAttributesSed(_setParam.SessionId, _setParam.MethodsName["SetDocumentAttributesSed"], SetDocumentAttributesSedItem());
                    break;
            }

            _userHistory.CurrentItem.MethodName = methodName.ToString();
            //_userHistory.CurrentItem.Key = 5;

            return result;
        }
开发者ID:MaximGomon,项目名称:BARS-Emulyator,代码行数:63,代码来源:CoreForm.cs


注:本文中的System.Methods.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。