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


C# Microsoft.ToString方法代码示例

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


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

示例1: VisitIdentifierName

 public override void VisitIdentifierName(Microsoft.CodeAnalysis.CSharp.Syntax.IdentifierNameSyntax node)
 {
     if (node.ToString() == identifier)
     {
         var symbol = model.GetSymbolInfo(node).Symbol;
         if (symbol != null)
         {
             symbols.Add(symbol);
         }
     }
     base.VisitIdentifierName(node);
 }
开发者ID:x335,项目名称:WootzJs,代码行数:12,代码来源:VariableUsageFinder.cs

示例2: ChangeState

 public void ChangeState(Microsoft.Transactions.Wsat.StateMachines.State newState)
 {
     if (this.history != null)
     {
         this.history.AddState(newState.ToString());
     }
     if (this.current != null)
     {
         if (DebugTrace.Info)
         {
             DebugTrace.TxTrace(TraceLevel.Info, this.enlistment.EnlistmentId, "Leaving [{0}]", this.current);
         }
         this.current.Leave(this);
     }
     if (DebugTrace.Info)
     {
         DebugTrace.TxTrace(TraceLevel.Info, this.enlistment.EnlistmentId, "Entering [{0}]", newState);
     }
     this.current = newState;
     this.current.Enter(this);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:21,代码来源:StateMachine.cs

示例3: TranslateAzureServiceBusReceiveModeValueToConfigurationValue

        public static MessageReceiveMode TranslateAzureServiceBusReceiveModeValueToConfigurationValue(Microsoft.ServiceBus.Messaging.ReceiveMode azureServiceBusReceiveMode)
        {
            MessageReceiveMode result;

            switch(azureServiceBusReceiveMode)
            {
                case Microsoft.ServiceBus.Messaging.ReceiveMode.PeekLock:
                    result = MessageReceiveMode.PeekLock;

                    break;

                case Microsoft.ServiceBus.Messaging.ReceiveMode.ReceiveAndDelete:
                    result = MessageReceiveMode.ReceiveAndDelete;

                    break;

                default:
                    throw new ArgumentOutOfRangeException("azureServiceBusReceiveMode", "Unexpected ReceiveMode value specified: " + azureServiceBusReceiveMode.ToString());
            }

            return result;
        }
开发者ID:gitter-badger,项目名称:Obvs.AzureServiceBus,代码行数:22,代码来源:ConfigurationUtilities.cs

示例4: TriggerEquals

 public static bool TriggerEquals(Microsoft.Win32.TaskScheduler.Trigger a, Microsoft.Win32.TaskScheduler.Trigger b)
 {
     return (a.ToString() == b.ToString()) && (a.StartBoundary == b.StartBoundary) && (a.EndBoundary == b.EndBoundary) && (a.ExecutionTimeLimit == b.ExecutionTimeLimit);
 }
开发者ID:ndubul,项目名称:Chillas,代码行数:4,代码来源:SchedulerViewModel.cs

示例5: SetWhich

 /// <summary>
 /// Sets ComboBox to TaskScheduler.WhichWeek
 /// </summary>
 /// <param name="aWitch">TaskScheduler.WhichWeek</param>
 private void SetWhich(Microsoft.Win32.TaskScheduler.WhichWeek aWitch)
 {
     this.WhichComboBox.SelectedItem = aWitch.ToString().Replace("Week", string.Empty);
 }
开发者ID:ZlayaZhaba,项目名称:XervBackup,代码行数:8,代码来源:TaskEditControl.cs

示例6: VerifyRegistryKeyPermission

        /// <summary>
        /// Verify that a specific user has access rights to a specific Registry Key
        /// </summary>
        /// <param name="userName">Name of the user to check for</param>
        /// <param name="root">Root key for the registry key</param>
        /// <param name="subKey">Registry key to check for</param>
        /// <param name="rights">Expected access rights</param>
        public static void VerifyRegistryKeyPermission(string userName, Microsoft.Win32.RegistryKey root, string subKey, RegistryRights rights)
        {
            RegistryKey registryKey = root.OpenSubKey(subKey);
            RegistrySecurity registrySecurity = registryKey.GetAccessControl();
            AuthorizationRuleCollection accessRules = registrySecurity.GetAccessRules(true, true, typeof(NTAccount));

            foreach (RegistryAccessRule accessRule in accessRules)
            {
                if (userName.ToLowerInvariant().Equals(accessRule.IdentityReference.Value.ToLowerInvariant()))
                {
                    if ((accessRule.RegistryRights & rights) == rights)
                    {
                        return;
                    }
                }
            }

            Assert.True(false, string.Format("User '{0}' do not have the correct permessions to RegistryKey '{1}/{2}'.", userName, root.ToString(), subKey));
        }
开发者ID:bleissem,项目名称:wix3,代码行数:26,代码来源:PermissionsVerifier.cs

示例7: InputManager_KeyPressedCallback

 private void InputManager_KeyPressedCallback(Microsoft.Xna.Framework.Input.Keys key)
 {
     if(!HasKeyboardFocus || !IsEditable)
     {
         return;
     }
     Keys prevKey = Key;
     Key = key;
     Text = key.ToString();
     OnTextModified.Invoke(Text);
     OnKeyModified.Invoke(prevKey, Key, this);
 }
开发者ID:scorvi,项目名称:dwarfcorp,代码行数:12,代码来源:KeyEdit.cs

示例8: GetSectionName

 public static string GetSectionName(Microsoft.Office.Interop.Visio.VisSectionIndices value)
 {
     string s = value.ToString();
     return s.Substring(10); // Get Rid of the visSection prefix
 }
开发者ID:shekharssorot2002,项目名称:VisioAutomation2.0,代码行数:5,代码来源:ShapeSheetHelper.cs

示例9: CheckDirectionMenu

 private void CheckDirectionMenu(Microsoft.Msagl.Drawing.LayerDirection dir) {
     Check(this.direction.ToString(), false);
     this.direction = dir;
     Check(dir.ToString(), true);
 }        
开发者ID:WenzCao,项目名称:automatic-graph-layout,代码行数:5,代码来源:Details.xaml.cs

示例10: GetText

 private string GetText(Microsoft.Msagl.Drawing.DrawingObject drawingObject) {
     if (drawingObject == null)
         return "null";
     return drawingObject.ToString();
 }
开发者ID:WenzCao,项目名称:automatic-graph-layout,代码行数:5,代码来源:Details.xaml.cs

示例11: UpdateExecutionPolicy

        public void UpdateExecutionPolicy(Microsoft.PowerShell.ExecutionPolicy policy)
        {
            log.Info("Attempting to update Powershell Execution policy");
            using (PWS ps = PWS.Create())
            {
                ps.AddScript("Set-Executionpolicy -Scope CurrentUser -ExecutionPolicy " + policy.ToString());

                //ps.AddScript("./Scripts/PowerShell/UpdateExecutionPolicy.ps1 -policy " + policy.ToString());
                var result = ps.Invoke();
                if (ps.Streams.Error.Count > 0)
                {
                    log.Error(ps.Streams.Error[0].ErrorDetails.Message);
                }

                //log.Info("Current Powershell execution policy changed from '" + result[0].Members["CurrentPolicy"].Value.ToString() + "' to '"+ result[0].Members["NewPolicy"].Value.ToString()+"'");

            }
        }
开发者ID:ATXcoder,项目名称:SPUpdater,代码行数:18,代码来源:PowerShell.cs

示例12: AdControl_ErrorOccurred

 private void AdControl_ErrorOccurred(object sender, Microsoft.Advertising.AdErrorEventArgs e)
 {
     Console.Write(e.ToString());
 }
开发者ID:damicolo,项目名称:SantaJumper,代码行数:4,代码来源:MainPage.xaml.cs

示例13: OnKeyDown

        public override bool OnKeyDown(Microsoft.Xna.Framework.Input.Keys k)
        {
            if ((_visible) && (_focus))
            {
                switch (k)
                {
                    case Keys.Back:
                        if ((_text.Length + 1 > _cursor) && (_cursor > 0))
                        {
                            _text = _text.Remove(_cursor - 1, 1);
                            _cursor -= 1;
                        }
                        return true;

                    case Keys.Delete:
                        if (_text.Length + 1 > _cursor + 1)
                            _text = _text.Remove(_cursor, 1);
                        return true;

                    case Keys.Space:
                        _text = _text.Insert(_cursor++, " ");
                        return true;

                    case Keys.Insert:
                        _overwrite = !_overwrite;
                        return true;

                    case Keys.Enter:
                        _parent.HandleEvent(false, Backend.Events.TextEntered);
                        return true;

                    case Keys.Left:
                        if (_cursor > 0)
                            _cursor -= 1;
                        return true;

                    case Keys.Right:
                        if (_cursor < _text.Length)
                            _cursor += 1;
                        return true;

                    case Keys.Home:
                        _cursor = 0;
                        return true;

                    case Keys.End:
                        _cursor = _text.Length - 1;
                        return true;
                    case Keys.D0:
                        _text = _text.Insert(_cursor++, "0");

                        break;
                    case Keys.D1:
                        _text = _text.Insert(_cursor++, "1");

                        break;

                    case Keys.D2:
                        _text = _text.Insert(_cursor++, "2");

                        break;
                    case Keys.D3:
                        _text = _text.Insert(_cursor++, "3");
                        break;
                    case Keys.D4:
                        _text = _text.Insert(_cursor++, "4");

                        break;
                    case Keys.D5:
                        _text = _text.Insert(_cursor++, "5");

                        break;
                    case Keys.D6:
                        _text = _text.Insert(_cursor++, "6");

                        break;
                    case Keys.D7:
                        _text = _text.Insert(_cursor++, "7");

                        break;
                    case Keys.D8:
                        _text = _text.Insert(_cursor++, "8");

                        break;
                    case Keys.D9:
                        _text = _text.Insert(_cursor++, "9");

                        break;
                    default:
                        if (k.ToString().Length == 1)
                        {
                            if ((Keyboard.GetState().IsKeyDown(Keys.LeftShift)) || (Keyboard.GetState().IsKeyDown(Keys.RightShift)))
                                _text = _text.Insert(_cursor, k.ToString().ToUpper());
                            else
                                _text = _text.Insert(_cursor, k.ToString().ToLower());
                            _cursor += 1;
                            return true;
                        }
                        break;

//.........这里部分代码省略.........
开发者ID:propra13-orga,项目名称:gruppe22,代码行数:101,代码来源:TextInput.cs


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