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


C# Shared.ToString方法代码示例

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


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

示例1:

 void IUIWidget.OnOperationChange(Shared.Core.Operation operation)
 {
     string lineOne = operation != null ? operation.ToString(SettingsManager.Instance.GetSetting("OperationWidget", "LineOne").GetString()) : "(n/A)";
     string lineTwo = operation != null ? operation.ToString(SettingsManager.Instance.GetSetting("OperationWidget", "LineTwo").GetString()) : "(n/A)";
     string lineThree = operation != null ? operation.ToString(SettingsManager.Instance.GetSetting("OperationWidget", "LineThree").GetString()) : "(n/A)";
     LineOne.Inlines.Clear();
     LineOne.Inlines.Add(Helper.Traverse(lineOne));
     LineTwo.Inlines.Clear();
     LineTwo.Inlines.Add(Helper.Traverse(lineTwo));
     LineThree.Inlines.Clear();
     LineThree.Inlines.Add(Helper.Traverse(lineThree));
 }
开发者ID:Knatter33,项目名称:AlarmWorkflow,代码行数:12,代码来源:OperationWidget.xaml.cs

示例2: ToString_returns_a_string_representation_of_the_object

        public void ToString_returns_a_string_representation_of_the_object()
        {
            var shared = new Shared<object>();

            const string expected = "Shared<System.Object>";

            Assert.AreEqual(expected, shared.ToString());
        }
开发者ID:ondfisk,项目名称:C5.Concurrent,代码行数:8,代码来源:SharedTests.cs

示例3: Log

 public void Log(Shared.Category category, string message)
 {
     var msg = string.Format("{0} {1}: {2}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), category.ToString().ToUpper(), message);
     sb.AppendLine(msg);
 }
开发者ID:scheshan,项目名称:JobConsole,代码行数:5,代码来源:DefaultLogger.cs

示例4:

        void IUIWidget.OnOperationChange(Shared.Core.Operation operation)
        {
            string lineOne = null;
            if (!string.IsNullOrWhiteSpace(_expressionLineOne))
            {
                lineOne = operation != null ? operation.ToString(_expressionLineOne) : "(n/A)";
            }
            string lineTwo = null;
            if (!string.IsNullOrWhiteSpace(_expressionLineTwo))
            {
                lineTwo = operation != null ? operation.ToString(_expressionLineTwo) : "(n/A)";
            }
            string lineThree = null;
            if (!string.IsNullOrWhiteSpace(_expressionLineThree))
            {
                lineThree = operation != null ? operation.ToString(_expressionLineThree) : "(n/A)";
            }
            LineOne.Inlines.Clear();
            LineTwo.Inlines.Clear();
            LineThree.Inlines.Clear();

            LineOne.Inlines.Add(Helper.Execute(lineOne));
            LineTwo.Inlines.Add(Helper.Execute(lineTwo));
            LineThree.Inlines.Add(Helper.Execute(lineThree));
        }
开发者ID:Bolde,项目名称:AlarmWorkflow,代码行数:25,代码来源:OperationWidget.xaml.cs

示例5: FormatLine

        private string FormatLine(string expression, Shared.Core.Operation operation)
        {
            if (!string.IsNullOrWhiteSpace(expression))
            {
                try
                {
                    return operation != null ? operation.ToString(expression) : "(n/A)";
                }
                catch (AssertionFailedException)
                {
                    // This exception may occure if the format of the value is broken or other problems with the format exist...
                    return string.Empty;
                }
            }

            return string.Empty;
        }
开发者ID:huoxudong125,项目名称:AlarmWorkflow,代码行数:17,代码来源:OperationWidget.xaml.cs


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