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


C# Element.ToString方法代码示例

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


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

示例1: FindEqual

 public override List<int> FindEqual(Element key)
 {
     List<int> row;
     if (_entries.TryGetValue(key.ToString(), out row)) {
         return row;
     }
     return new List<int>();
 }
开发者ID:sekcheong,项目名称:parser,代码行数:8,代码来源:TableIndexerHash.cs

示例2: fadeElement

    public void fadeElement(Element element)
    {
		float elementCount = element.count;
        float elementMinCount = element.minCount;   
        
        if(element.minCount < 1)
        {
            elementMinCount = 1;
        }  

        alpha = elementCount / elementMinCount;
        if (alpha > .5f) {
            string test = element.ToString();
         }           
    }		
开发者ID:dggriffin,项目名称:Rain-Rain-Ritual,代码行数:15,代码来源:Pulse.cs

示例3: Send

 /// <summary>
 /// Send a xml element over the XmppConnection
 /// </summary>
 /// <param name="e"></param>
 public virtual void Send(Element e)
 {
     Send(e.ToString());
 }
开发者ID:phiree,项目名称:dzdocs,代码行数:8,代码来源:XmppConnection.cs

示例4: Send

        public override void Send(Element e)
        {
            // this is a hack to not send the xmlns="jabber:component:accept" with all packets
            Element dummyEl = new Element("a");
            dummyEl.Namespace = Uri.ACCEPT;

            dummyEl.AddChild(e);
            string toSend = dummyEl.ToString();

            Send(toSend.Substring(35, toSend.Length - 35 - 4));
        }
开发者ID:SightstoneOfficial,项目名称:agsxmpp,代码行数:11,代码来源:XmppComponentConnection.cs

示例5: Send

 private void Send(Element el)
 {
     Send(el.ToString());
 }
开发者ID:SiteView,项目名称:ECC8.13,代码行数:4,代码来源:XmppServerConnection.cs

示例6: FindClassOrObject

        private void FindClassOrObject(Element e)
        {
            try
            {
                e.Type = FindClass2(e.TypeName);
            }
            catch (Exception x)
            {
                DoLog("Assigning object-type to member [{0}] - TypeName [{1}]", e.ToString(), e.TypeName);
                e.Type = ObjectClass;
            }

        }
开发者ID:hultqvist,项目名称:SharpKit-SDK,代码行数:13,代码来源:TinyMCECodeGenerator.cs

示例7: toTermRangeQuery

            /**
             * 组装TermRangeQuery
             * @param elements
             * @return
             */
            private TermRangeQuery toTermRangeQuery(Element fieldNameEle, LinkedList<Element> elements)
            {

                bool includeFirst = false;
                bool includeLast = false;
                String firstValue = null;
                String lastValue = null;
                //检查第一个元素是否是[或者{
                Element first = elements.First.Value;
                if ('[' == first.Type)
                {
                    includeFirst = true;
                }
                else if ('{' == first.Type)
                {
                    includeFirst = false;
                }
                else
                {
                    throw new Exception("表达式异常");
                }
                //检查最后一个元素是否是]或者}
                Element last = elements.Last.Value;
                if (']' == last.Type)
                {
                    includeLast = true;
                }
                else if ('}' == last.Type)
                {
                    includeLast = false;
                }
                else
                {
                    throw new Exception("表达式异常, RangeQuery缺少结束括号");
                }
                if (elements.Count < 4 || elements.Count > 5)
                {
                    throw new Exception("表达式异常, RangeQuery 错误");
                }
                //读出中间部分
                Element e2 = elements.ElementAt(1);
                if ('\'' == e2.Type)
                {
                    firstValue = e2.ToString();
                    //
                    Element e3 = elements.ElementAt(2);
                    if (',' != e3.Type)
                    {
                        throw new Exception("表达式异常, RangeQuery缺少逗号分隔");
                    }
                    //
                    Element e4 = elements.ElementAt(3);
                    if ('\'' == e4.Type)
                    {
                        lastValue = e4.ToString();
                    }
                    else if (e4 != last)
                    {
                        throw new Exception("表达式异常,RangeQuery格式错误");
                    }
                }
                else if (',' == e2.Type)
                {
                    firstValue = null;
                    //
                    Element e3 = elements.ElementAt(2);
                    if ('\'' == e3.Type)
                    {
                        lastValue = e3.ToString();
                    }
                    else
                    {
                        throw new Exception("表达式异常,RangeQuery格式错误");
                    }

                }
                else
                {
                    throw new Exception("表达式异常, RangeQuery格式错误");
                }

                return new TermRangeQuery(fieldNameEle.ToString(), firstValue, lastValue, includeFirst, includeLast);
            }
开发者ID:mamboer,项目名称:IKAnalyzer.Net,代码行数:88,代码来源:IKQueryParser.cs

示例8: Send

        public override void Send(Element e)
        {
            if (!(ClientSocket is BoshClientSocket))
            {
                // this is a hack to not send the xmlns="jabber:client" with all packets
                Element dummyEl = new Element("a");
                dummyEl.Namespace = Uri.CLIENT;

                dummyEl.AddChild(e);
                string toSend = dummyEl.ToString();

                Send(toSend.Substring(25, toSend.Length - 25 - 4));
            }
            else
                base.Send(e);
        }
开发者ID:jptoto,项目名称:argsxmpp,代码行数:16,代码来源:XmppClientConnection.cs

示例9: FormatValue

 private string FormatValue(Element e)
 {
     if (e.DataType == ElementType.DATETIME) {
         return e.DateTimeValue().ToString();
     }
     else return e.ToString();
 }
开发者ID:sekcheong,项目名称:parser,代码行数:7,代码来源:Main.cs

示例10: Send

 public void Send(Element elm)
 {
     Send(elm.ToString());
 }
开发者ID:lsalamon,项目名称:solution2010,代码行数:4,代码来源:ClientConnection.cs

示例11: ClientOnOnStreamError

 private void ClientOnOnStreamError(object sender, Element element)
 {
     _connecting = false;
     _connected = false;
     _logger.WarnFormat("Stream error: {0}", element.ToString());
 }
开发者ID:andrewmyhre,项目名称:DeployD,代码行数:6,代码来源:JabberNotifier.cs

示例12: ReceiveElementNegativeProtection

	public void ReceiveElementNegativeProtection(int protection, Element element){

        EffectUIManager.GetInstance().AddTextEffect(this, new TextResistanceLoss(protection, element));

        Logger.Debug("Receive element negative protection : " + protection + " for element : " + element._name);

        /*int val = Math.Min (protection, Protections[element]);

		Protections[element] -= val;
		SommeProtection -= val;

		protection -= val;

		int max = MaxProtection - SommeNegativeProtection;

		ProtectionsNegative[element] += Math.Min (max, protection);
		SommeNegativeProtection += Math.Min (max, protection);*/

        ProtectionsNegative[element] = Mathf.Min(ProtectionsNegative[element] + protection, 100);
        Logger.Trace("Protection " + element.ToString() + " new value : " + Protections[element]);
    }
开发者ID:LilTsubaki,项目名称:Les-fragments-d-Erule,代码行数:21,代码来源:Character.cs

示例13: SetElement

 internal void SetElement(Element toElement)
 {
     comboBox1.SelectedText = toElement.ToString();
 }
开发者ID:segfaultvicta,项目名称:CSharpMCS,代码行数:4,代码来源:InputElement.cs

示例14: ClientConnectionOnOnStreamError

 private void ClientConnectionOnOnStreamError(object sender, Element element)
 {
     Console.WriteLine("XMPP Stream Error of type {0}. ", element.GetType());
     Console.WriteLine(element.ToString());
 }
开发者ID:SimplyChris,项目名称:LibHipChat,代码行数:5,代码来源:XMPPConnectionTestsEvents.cs

示例15: Print

 internal static void Print(Element el)
 {
     Console.WriteLine(el.ToString(Formatting.Indented));
     Console.WriteLine("\r\n");
 }
开发者ID:don59,项目名称:agsXmpp,代码行数:5,代码来源:Program.cs


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