當前位置: 首頁>>代碼示例>>C#>>正文


C# All.ToString方法代碼示例

本文整理匯總了C#中All.ToString方法的典型用法代碼示例。如果您正苦於以下問題:C# All.ToString方法的具體用法?C# All.ToString怎麽用?C# All.ToString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在All的用法示例。


在下文中一共展示了All.ToString方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Analyze

        public Analyze Analyze(string host, Publish publish, StartNew startNew, FromCache fromCache, int? maxHours, All all, IgnoreMismatch ignoreMismatch)
        {
            var analyzeModel = new Analyze();

            // Checking host is valid before continuing
            if (!_urlValidation.IsValid(host))
            {
                analyzeModel.HasErrorOccurred = true;
                analyzeModel.Errors.Add(new Error { message = "Host does not pass preflight validation. No Api call has been made." });
                return analyzeModel;
            }

            // Building request model
            var requestModel = _requestModelFactory.NewAnalyzeRequestModel(ApiUrl, "analyze", host, publish.ToString().ToLower(), startNew.ToString().ToLower(),
                fromCache.ToString().ToLower(), maxHours, all.ToString().ToLower(), ignoreMismatch.ToString().ToLower());

            try
            {
                var webResponse = _apiProvider.MakeGetRequest(requestModel);
                analyzeModel = _responsePopulation.AnalyzeModel(webResponse, analyzeModel);
            }
            catch (Exception ex)
            {
                analyzeModel.HasErrorOccurred = true;
                analyzeModel.Errors.Add(new Error { message = ex.ToString() });
            }

            // Checking if errors have occoured either from ethier api or wrapper
            if (analyzeModel.Errors.Count != 0 && !analyzeModel.HasErrorOccurred) { analyzeModel.HasErrorOccurred = true; }

            return analyzeModel;
        }
開發者ID:b3nt0,項目名稱:ssllabs-api-wrapper,代碼行數:32,代碼來源:SSLLabsApiService.cs

示例2: LoadShader

        int LoadShader(All type, string source)
        {
            int shader = GL.CreateShader (type);
            if (shader == 0)
                throw new InvalidOperationException ("Unable to create shader");

            int length = 0;
            GL.ShaderSource (shader, 1, new string [] {source}, (int[])null);
            GL.CompileShader (shader);

            int compiled = 0;
            GL.GetShader (shader, All.CompileStatus, ref compiled);
            if (compiled == 0) {
                length = 0;
                GL.GetShader (shader, All.InfoLogLength, ref length);
                if (length > 0) {
                    var log = new StringBuilder (length);
                    GL.GetShaderInfoLog (shader, length, ref length, log);
                    Log.Debug ("GL2", "Couldn't compile shader: " + log.ToString ());
                }

                GL.DeleteShader (shader);
                throw new InvalidOperationException ("Unable to compile shader of type : " + type.ToString ());
            }

            return shader;
        }
開發者ID:4ndr01d,項目名稱:monodroid-samples,代碼行數:27,代碼來源:PaintingView.cs


注:本文中的All.ToString方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。