System.Net.Policy.ClientAccessPolicy.CreateResource C# (CSharp) Method

CreateResource() static private method

static private CreateResource ( XmlReader reader ) : Resource
reader XmlReader
return Resource
		static Resource CreateResource (XmlReader reader)
		{
			int n = reader.AttributeCount;
			string path = reader.GetAttribute ("path");
			if (path != null)
				n--;
			string subpaths = reader.GetAttribute ("include-subpaths");
			if (subpaths != null)
				n--;
			if ((n != 0) || !reader.IsEmptyElement)
				return null;

			return new Resource () { 
				Path = path,
				IncludeSubpaths = subpaths == null ? false : XmlConvert.ToBoolean (subpaths)
			};
		}