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


C# SmallXmlParser.GetValue方法代码示例

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


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

示例1: GetNotNull

		string GetNotNull (SmallXmlParser.IAttrList attrs, string name)
		{
			string value = attrs.GetValue (name);
			if (value == null || value == "") 
				throw new RemotingException (name + " attribute is required");
			return value;
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:7,代码来源:RemotingConfiguration.cs

示例2: ReadPreload

		void ReadPreload (SmallXmlParser.IAttrList attrs)
		{
			string type = attrs.GetValue ("type");
			string assm = attrs.GetValue ("assembly");
			
			if (type != null && assm != null)
				throw new RemotingException ("Type and assembly attributes cannot be specified together");
				
			if (type != null)
				SoapServices.PreLoad (Type.GetType (type));
			else if (assm != null)
				SoapServices.PreLoad (Assembly.Load (assm));
			else
				throw new RemotingException ("Either type or assembly attributes must be specified");
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:15,代码来源:RemotingConfiguration.cs

示例3: ReadLifetine

		void ReadLifetine (SmallXmlParser.IAttrList attrs)
		{
			for (int i=0; i < attrs.Names.Length; ++i) {
				switch (attrs.Names[i]) {
				case "leaseTime":
					LifetimeServices.LeaseTime = ParseTime (attrs.GetValue(i));
					break;
				case "sponsorshipTimeout":
					LifetimeServices.SponsorshipTimeout = ParseTime (attrs.GetValue(i));
					break;
				case "renewOnCallTime":
					LifetimeServices.RenewOnCallTime = ParseTime (attrs.GetValue(i));
					break;
				case "leaseManagerPollTime":
					LifetimeServices.LeaseManagerPollTime = ParseTime (attrs.GetValue(i));
					break;
				default:
					throw new RemotingException ("Invalid attribute: " + attrs.Names[i]);
				}
			}
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:21,代码来源:RemotingConfiguration.cs

示例4: ReadCustomProviderData

		void ReadCustomProviderData (string name, SmallXmlParser.IAttrList attrs)
		{
			SinkProviderData parent = (SinkProviderData) currentProviderData.Peek ();
			
			SinkProviderData data = new SinkProviderData (name);
			for (int i=0; i < attrs.Names.Length; ++i) 
				data.Properties [attrs.Names[i]] = attrs.GetValue (i);
				
			parent.Children.Add (data);
			currentProviderData.Push (data);
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:11,代码来源:RemotingConfiguration.cs

示例5: ParseElement

		public void ParseElement (string name, SmallXmlParser.IAttrList attrs)
		{
			if (currentProviderData != null)
			{
				ReadCustomProviderData (name, attrs);
				return;
			}
			
			switch (name) 
			{
				case "application":
					ValidatePath (name, "system.runtime.remoting");
					if (attrs.Names.Length > 0)
						appName = attrs.Values[0];
					break;
					
				case "lifetime":
					ValidatePath (name, "application");
					ReadLifetine (attrs);
					break;
					
				case "channels":
					ValidatePath (name, "system.runtime.remoting", "application");
					break;
					
				case "channel":
					ValidatePath (name, "channels");
					if (currentXmlPath.IndexOf ("application") != -1)
						ReadChannel (attrs, false);
					else
						ReadChannel (attrs, true);
					break;
					
				case "serverProviders":
					ValidatePath (name, "channelSinkProviders", "channel");
					break;
					
				case "clientProviders":
					ValidatePath (name, "channelSinkProviders", "channel");
					break;
					
				case "provider":
				case "formatter":
					ProviderData prov;
					
					if (CheckPath ("application/channels/channel/serverProviders") ||
						CheckPath ("channels/channel/serverProviders"))
					{
						prov = ReadProvider (name, attrs, false);
						currentChannel.ServerProviders.Add (prov);
					}
					else if (CheckPath ("application/channels/channel/clientProviders") ||
						CheckPath ("channels/channel/clientProviders"))
					{
						prov = ReadProvider (name, attrs, false);
						currentChannel.ClientProviders.Add (prov);
					}
					else if (CheckPath ("channelSinkProviders/serverProviders"))
					{
						prov = ReadProvider (name, attrs, true);
						RemotingConfiguration.RegisterServerProviderTemplate (prov);
					}
					else if (CheckPath ("channelSinkProviders/clientProviders"))
					{
						prov = ReadProvider (name, attrs, true);
						RemotingConfiguration.RegisterClientProviderTemplate (prov);
					}
					else 
						ValidatePath (name);
					break;
					
				case "client":
					ValidatePath (name, "application");
					currentClientUrl = attrs.GetValue ("url");
					break;
					
				case "service":
					ValidatePath (name, "application");
					break;
					
				case "wellknown":
					ValidatePath (name, "client", "service");
					if (CheckPath ("client"))
						ReadClientWellKnown (attrs);
					else
						ReadServiceWellKnown (attrs);
					break;
					
				case "activated":
					ValidatePath (name, "client", "service");
					if (CheckPath ("client"))
						ReadClientActivated (attrs);
					else
						ReadServiceActivated (attrs);
					break;
					
				case "soapInterop":
					ValidatePath (name, "application");
					break;
					
//.........这里部分代码省略.........
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:101,代码来源:RemotingConfiguration.cs

示例6: OnStartElement

 public void OnStartElement(string name, SmallXmlParser.IAttrList attrs)
 {
     SecurityElement newel = new SecurityElement(name);
     if (root == null)
     {
         root = newel;
         current = newel;
     }
     else
     {
         SecurityElement parent = (SecurityElement)stack.Peek();
         parent.AddChild(newel);
     }
     stack.Push(newel);
     current = newel;
     // attributes
     int n = attrs.Length;
     for (int i = 0; i < n; i++)
         current.AddAttribute(attrs.GetName(i), attrs.GetValue(i));
 }
开发者ID:lbddk,项目名称:ahzs-client,代码行数:20,代码来源:SecurityParser.cs


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