• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# XacmlVersion类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中XacmlVersion的典型用法代码示例。如果您正苦于以下问题:C# XacmlVersion类的具体用法?C# XacmlVersion怎么用?C# XacmlVersion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



XacmlVersion类属于命名空间,在下文中一共展示了XacmlVersion类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: TargetMatchBaseReadWrite

 /// <summary>
 /// Creates an instance of a TargetMatchBase with the values specified.
 /// </summary>
 /// <param name="matchId">The match id</param>
 /// <param name="attributeValue">The attribute value instance.</param>
 /// <param name="attributeReference">An attribute reference instance.</param>
 /// <param name="schemaVersion">The version of the schema that was used to validate.</param>
 protected TargetMatchBaseReadWrite(string matchId, AttributeValueElementReadWrite attributeValue, AttributeReferenceBase attributeReference, XacmlVersion schemaVersion)
     : base(XacmlSchema.Policy, schemaVersion)
 {
     _id = matchId;
     _attributeValue = attributeValue;
     _attributeReference = attributeReference;
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:14,代码来源:TargetMatchBaseReadWrite.cs


示例2: SubjectAttributeDesignatorElement

 /// <summary>
 /// Creates an instance of the SubjectAttributeDesignator using the provided XmlReader. It also calls the
 /// base class constructor specifying the XmlReader.
 /// </summary>
 /// <param name="reader">The XmlReader positioned at the SubjectAttributeDesignator node.</param>
 /// <param name="version">The version of the schema that was used to validate.</param>
 public SubjectAttributeDesignatorElement(XmlReader reader, XacmlVersion version)
     :
     base(reader, version)
 {
     if (reader == null) throw new ArgumentNullException("reader");
     _subjectCategory = reader.GetAttribute(PolicySchema1.SubjectAttributeDesignatorElement.SubjectCategory);
 }
开发者ID:Condeti,项目名称:XACML.NET,代码行数:13,代码来源:SubjectAttributeDesignatorElement.cs


示例3: ValidateSchema

 /// <summary>
 /// 根据给定的版本号验证给定的模式。
 /// </summary>
 /// <param name="reader">用于读取命名空间</param>
 /// <param name="version">用于验证版本号</param>
 /// <returns><c>true</c>, 如果命名空间正确</returns>
 protected bool ValidateSchema(XmlReader reader, XacmlVersion version)
 {
     if (reader == null) throw new ArgumentNullException("reader");
     switch (_schema)
     {
         case XacmlSchema.Policy:
             switch (version)
             {
                 case XacmlVersion.Version10:
                 case XacmlVersion.Version11:
                     return (reader.NamespaceURI == Consts.Schema1.Namespaces.Policy);
                 case XacmlVersion.Version20:
                     return (reader.NamespaceURI == Consts.Schema2.Namespaces.Policy);
                 default:
                     throw new EvaluationException("意外的版本号" + version);
             }
             break;
         case XacmlSchema.Context:
             switch (version)
             {
                 case XacmlVersion.Version10:
                 case XacmlVersion.Version11:
                     return (reader.NamespaceURI == Consts.Schema1.Namespaces.Context);
                 case XacmlVersion.Version20:
                     return (reader.NamespaceURI == Consts.Schema2.Namespaces.Context);
                 default:
                     throw new EvaluationException("意外的版本号" + version);
             }
             break;
         default:
             throw new EvaluationException("意外的模式" + _schema);
     }
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:39,代码来源:XacmlElement.cs


示例4: AttributeAssignmentElementReadWrite

		/// <summary>
		/// Creates an instance of the ReadWriteAttributeAssignment using the provided XmlReader.
		/// </summary>
		/// <param name="reader">The XmlReader positioned at the AttributeAssignament node.</param>
		/// <param name="schemaVersion">The version of the schema that was used to validate.</param>
		public AttributeAssignmentElementReadWrite( XmlReader reader, XacmlVersion schemaVersion )
			: base( XacmlSchema.Policy, schemaVersion )
		{
            if (reader == null) throw new ArgumentNullException("reader");
			if( reader.LocalName == PolicySchema1.ObligationElement.AttributeAssignment && 
				ValidateSchema( reader, schemaVersion ) )
			{
				if( reader.HasAttributes )
				{
					// Load all the attributes
					while( reader.MoveToNextAttribute() )
					{
						if( reader.LocalName == PolicySchema1.AttributeValueElement.DataType )
						{
							_dataType = reader.GetAttribute( PolicySchema1.AttributeValueElement.DataType );
						}
						else if( reader.LocalName == PolicySchema1.AttributeAssignmentElement.AttributeId )
						{
							_attributeId = reader.GetAttribute( PolicySchema1.AttributeAssignmentElement.AttributeId );
						}
					}
					reader.MoveToElement();
				}

				// Load the node contents
				_contents = reader.ReadInnerXml();
			}
			else
			{
				throw new Exception( Resource.ResourceManager[ Resource.MessageKey.exc_invalid_node_name, reader.LocalName ] );
			}
		}
开发者ID:Condeti,项目名称:XACML.NET,代码行数:37,代码来源:AttributeAssignmentElementReadWrite.cs


示例5: AttributeValueElementReadWrite

 /// <summary>
 /// Creates an instance of the AttributeValue class using the XmlReader and the name of the node that 
 /// defines the AttributeValue. 
 /// </summary>
 /// <param name="reader">The XmlReader positioned at the node AttributeValue.</param>
 /// <param name="schemaVersion">The version of the schema that was used to validate.</param>
 public AttributeValueElementReadWrite(XmlReader reader, XacmlVersion schemaVersion)
     : base(XacmlSchema.Policy, schemaVersion)
 {
     if (reader == null) throw new ArgumentNullException("reader");
     if (reader.LocalName == Consts.Schema1.AttributeValueElement.AttributeValue &&
         ValidateSchema(reader, schemaVersion))
     {
         if (reader.HasAttributes)
         {
             // Load all the attributes
             while (reader.MoveToNextAttribute())
             {
                 if (reader.LocalName == Consts.Schema1.AttributeValueElement.DataType)
                 {
                     _dataType = reader.GetAttribute(Consts.Schema1.AttributeValueElement.DataType);
                 }
             }
             reader.MoveToElement();
         }
         // Load the node contents
         _contents = reader.ReadInnerXml();
     }
     else
     {
         throw new Exception(string.Format(Properties.Resource.exc_invalid_node_name, reader.LocalName));
     }
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:33,代码来源:AttributeValueElementReadWrite.cs


示例6: ResponseElement

 /// <summary>
 /// Creates a response using the XmlReader instance provided.
 /// </summary>
 /// <remarks>This method is only provided for testing purposes, because it's easy to run the ConformanceTests
 /// comparing the expected response with the response created.</remarks>
 /// <param name="reader">The XmlReader positioned at the Response node.</param>
 /// <param name="schemaVersion">The version of the schema that was used to validate.</param>
 public ResponseElement(XmlReader reader, XacmlVersion schemaVersion)
     : base(XacmlSchema.Context, schemaVersion)
 {
     if (reader == null) throw new ArgumentNullException("reader");
     _results = new ResultCollection();
     if (reader.LocalName == Consts.ContextSchema.ResponseElement.Response)
     {
         while (reader.Read())
         {
             switch (reader.LocalName)
             {
                 case Consts.ContextSchema.ResultElement.Result:
                     _results.Add(new ResultElement(reader, schemaVersion));
                     break;
             }
             if (reader.LocalName == Consts.ContextSchema.ResponseElement.Response &&
                 reader.NodeType == XmlNodeType.EndElement)
             {
                 break;
             }
         }
     }
     else
     {
         throw new Exception(string.Format(Properties.Resource.exc_invalid_node_name, reader.LocalName));
     }
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:34,代码来源:ResponseElement.cs


示例7: StatusCodeElement

		/// <summary>
		/// Creates a StatusCode using an XmlReader instance provided.
		/// </summary>
		/// <param name="reader">The XmlReader instance positioned at the StatusCode node.</param>
		/// <param name="schemaVersion">The version of the schema that was used to validate.</param>
		public StatusCodeElement( XmlReader reader, XacmlVersion schemaVersion )
			: base( XacmlSchema.Context, schemaVersion )
		{
            if (reader == null) throw new ArgumentNullException("reader");
			if( reader.LocalName == ContextSchema.StatusElement.StatusCode )
			{
				_value = reader.GetAttribute( ContextSchema.StatusElement.Value );
				if( !reader.IsEmptyElement )
				{
					while( reader.Read() )
					{
						switch( reader.LocalName )
						{
							case ContextSchema.StatusElement.StatusCode:
								_statusCode = new StatusCodeElement( reader, schemaVersion );
								break;
						}
						if( reader.LocalName == ContextSchema.StatusElement.StatusCode && 
							reader.NodeType == XmlNodeType.EndElement )
						{
							break;
						}
					}
				}
			}
			else
			{
				throw new Exception( Resource.ResourceManager[ Resource.MessageKey.exc_invalid_node_name, reader.LocalName ] );
			}
		}
开发者ID:Condeti,项目名称:XACML.NET,代码行数:35,代码来源:StatusCodeElement.cs


示例8: RequestElementReadWrite

 /// <summary>
 /// Creates a new Request using the XmlReader instance provided.
 /// </summary>
 /// <param name="reader">The XmlReader positioned at the Request node.</param>
 /// <param name="schemaVersion">The version of the schema that was used to validate.</param>
 public RequestElementReadWrite(XmlReader reader, XacmlVersion schemaVersion)
     : base(XacmlSchema.Context, schemaVersion)
 {
     if (reader == null) throw new ArgumentNullException("reader");
     if (reader.LocalName == Consts.ContextSchema.RequestElement.Request)
     {
         while (reader.Read())
         {
             switch (reader.LocalName)
             {
                 case Consts.ContextSchema.RequestElement.Subject:
                     _subjects.Add(new SubjectElementReadWrite(reader, schemaVersion));
                     break;
                 case Consts.ContextSchema.RequestElement.Resource:
                     _resources.Add(new ResourceElementReadWrite(reader, schemaVersion));
                     break;
                 case Consts.ContextSchema.RequestElement.Action:
                     _action = new ActionElementReadWrite(reader, schemaVersion);
                     break;
                 case Consts.ContextSchema.RequestElement.Environment:
                     _environment = new EnvironmentElementReadWrite(reader, schemaVersion);
                     break;
             }
         }
     }
     else
     {
         throw new Exception(string.Format(Properties.Resource.exc_invalid_node_name, reader.LocalName));
     }
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:35,代码来源:RequestElementReadWrite.cs


示例9: PolicyElement

		/// <summary>
		/// Creates a new Policy with the specified arguments.
		/// </summary>
		/// <param name="id">The policy id.</param>
		/// <param name="description">THe policy description.</param>
		/// <param name="target">THe policy target.</param>
		/// <param name="rules">THe rules for this policy.</param>
		/// <param name="ruleCombiningAlgorithm">THe rule combining algorithm.</param>
		/// <param name="obligations">The Obligations for this policy.</param>
		/// <param name="xpathVersion">The XPath version supported.</param>
		/// <param name="combinerParameters">The combiner parameters in this policy.</param>
		/// <param name="ruleCombinerParameters">The rule parameters in this policy.</param>
		/// <param name="variableDefinitions">The variable definitions of this policy.</param>
		/// <param name="schemaVersion">The version of the schema that was used to validate.</param>
		public PolicyElement( string id, string description, TargetElementReadWrite target, RuleReadWriteCollection rules, 
			string ruleCombiningAlgorithm, ObligationReadWriteCollection obligations, string xpathVersion, ArrayList combinerParameters, 
			ArrayList ruleCombinerParameters, IDictionary variableDefinitions, XacmlVersion schemaVersion )
			: base( id, description, target, rules, ruleCombiningAlgorithm, obligations, xpathVersion, 
			combinerParameters, ruleCombinerParameters, variableDefinitions, schemaVersion )
		{
		}
开发者ID:mingkongbin,项目名称:anycmd,代码行数:21,代码来源:PolicyElement.cs


示例10: PolicyIdReferenceElementReadWrite

		/// <summary>
		/// Creates a new PolicyIdReference using the XmlReader instance provided.
		/// </summary>
		/// <param name="reader">The XmlReader positioned at the PolicyIdReference element.</param>
		/// <param name="schemaVersion">The version of the schema that was used to validate.</param>
		public PolicyIdReferenceElementReadWrite( XmlReader reader, XacmlVersion schemaVersion )
			: base( XacmlSchema.Policy, schemaVersion )
		{
            if (reader == null) throw new ArgumentNullException("reader");
			if( reader.LocalName == PolicySchema1.PolicyIdReferenceElement.PolicyIdReference && 
				ValidateSchema( reader, schemaVersion ) )
			{
				if( reader.HasAttributes )
				{
					// Load all the attributes
					while( reader.MoveToNextAttribute() )
					{
						if( reader.LocalName == PolicyReferenceElement.Version )
						{
							_version = reader.GetAttribute( PolicyReferenceElement.Version );
						}
						else if( reader.LocalName == PolicyReferenceElement.EarliestVersion )
						{
							_earliestVersion = reader.GetAttribute( PolicyReferenceElement.EarliestVersion );
						}
						else if( reader.LocalName == PolicyReferenceElement.LatestVersion )
						{
							_latestVersion = reader.GetAttribute( PolicyReferenceElement.LatestVersion );
						}					
					}
					reader.MoveToElement();
				}
				_policyIdReference = reader.ReadElementString();
			}
			else
			{
				throw new Exception( Resource.ResourceManager[ Resource.MessageKey.exc_invalid_node_name, reader.LocalName ] );
			}
		}
开发者ID:Condeti,项目名称:XACML.NET,代码行数:39,代码来源:PolicyIdReferenceElementReadWrite.cs


示例11: AttributeAssignmentElementReadWrite

 /// <summary>
 /// Creates an instance of the ReadWriteAttributeAssignment using the provided values
 /// </summary>
 /// <param name="attributeId"></param>
 /// <param name="dataType"></param>
 /// <param name="contents"></param>
 /// <param name="version"></param>
 public AttributeAssignmentElementReadWrite(string attributeId, string dataType, string contents, XacmlVersion version) :
     base(XacmlSchema.Policy, version)
 {
     _attributeId = attributeId;
     _dataType = dataType;
     _contents = contents;
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:14,代码来源:AttributeAssignmentElementReadWrite.cs


示例12: TargetItemsBaseReadWrite

 /// <summary>
 /// Creates a new TargetItem instance using the specified XmlReader instance provided, and the node names of 
 /// the "target item list" nodes which are provided by the derived class during construction. 
 /// </summary>
 /// <param name="reader">The XmlReader instance positioned at the "target item list" node.</param>
 /// <param name="itemsNodeName">The name of the "target item list" node.</param>
 /// <param name="anyItemNodeName">The name of the AnyXxxx node for this "target item list" node.</param>
 /// <param name="itemNodeName">The name of the "target item" node that can be defined within this "target 
 /// item list" node.</param>
 /// <param name="schemaVersion">The version of the schema that was used to validate.</param>
 protected TargetItemsBaseReadWrite(XmlReader reader, string itemsNodeName, string anyItemNodeName, string itemNodeName, XacmlVersion schemaVersion)
     : this(schemaVersion)
 {
     if (reader == null) throw new ArgumentNullException("reader");
     if (reader.LocalName == itemsNodeName && ValidateSchema(reader, schemaVersion))
     {
         while (reader.Read())
         {
             if (reader.LocalName == anyItemNodeName && ValidateSchema(reader, schemaVersion))
             {
                 _anyItem = true;
             }
             else if (reader.LocalName == itemNodeName && ValidateSchema(reader, schemaVersion))
             {
                 _items.Add((TargetItemBaseReadWrite)CreateTargetItem(reader));
             }
             else if (reader.LocalName == itemsNodeName &&
                 reader.NodeType == XmlNodeType.EndElement)
             {
                 break;
             }
         }
     }
     else
     {
         throw new Exception(string.Format(Properties.Resource.exc_invalid_node_name, reader.LocalName));
     }
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:38,代码来源:TargetItemsBaseReadWrite.cs


示例13: StatusElement

 /// <summary>
 /// Creates a Status using the supplied values.
 /// </summary>
 /// <param name="statusCode">The status code.</param>
 /// <param name="statusMessage">The status message.</param>
 /// <param name="statusDetail">The status detail.</param>
 /// <param name="schemaVersion">The version of the schema that was used to validate.</param>
 public StatusElement(StatusCodeElement statusCode, string statusMessage, string statusDetail, XacmlVersion schemaVersion)
     : base(XacmlSchema.Context, schemaVersion)
 {
     StatusCode = statusCode;
     _statusMessage = statusMessage;
     _statusDetail = statusDetail;
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:14,代码来源:StatusElement.cs


示例14: ObligationElementReadWrite

		/// <summary>
		/// Creates a new instance of the Obligation class using the XmlReader instance provided.
		/// </summary>
		/// <param name="reader">The XmlReader positioned at the Obligation node.</param>
		/// <param name="schemaVersion">The version of the schema that was used to validate.</param>
		public ObligationElementReadWrite( XmlReader reader, XacmlVersion schemaVersion )
			: base( XacmlSchema.Policy, schemaVersion )
		{
			if(reader != null)
			{
				if( reader.LocalName == PolicySchema1.ObligationElement.Obligation && 
					ValidateSchema( reader, schemaVersion ) )
				{
					_obligationId = reader.GetAttribute( PolicySchema1.ObligationElement.ObligationId );

					// Parses the Effect attribute value
					_fulfillOn = (Effect)Enum.Parse( 
						typeof(Effect), reader.GetAttribute( PolicySchema1.ObligationElement.FulfillOn ), false );

					// Read all the attribute assignments
					while( reader.Read() )
					{
						switch( reader.LocalName )
						{
							case PolicySchema1.ObligationElement.AttributeAssignment:
								_attributeAssignment.Add( new AttributeAssignmentElementReadWrite( reader, schemaVersion ) );
								break;
						}
						if( reader.LocalName == PolicySchema1.ObligationElement.Obligation && 
							reader.NodeType == XmlNodeType.EndElement )
						{
							break;
						}
					}
				}
			}
			else
				_obligationId = "[TODO]: Add Obligation ID";
		}
开发者ID:Condeti,项目名称:XACML.NET,代码行数:39,代码来源:ObligationElementReadWrite.cs


示例15: TargetItemsBase

		/// <summary>
		/// Creates a new TargetItem instance using the specified XmlReader instance provided, and the node names of 
		/// the "target item list" nodes which are provided by the derived class during construction. 
		/// </summary>
		/// <param name="reader">The XmlReader instance positioned at the "target item list" node.</param>
		/// <param name="itemsNodeName">The name of the "target item list" node.</param>
		/// <param name="anyItemNodeName">The name of the AnyXxxx node for this "target item list" node.</param>
		/// <param name="itemNodeName">The name of the "target item" node that can be defined within this "target 
		/// item list" node.</param>
		/// <param name="schemaVersion">The version of the schema that was used to validate.</param>
		protected TargetItemsBase( XmlReader reader, string itemsNodeName, string anyItemNodeName, string itemNodeName, XacmlVersion schemaVersion )
			: base( schemaVersion )
		{
            if (reader == null) throw new ArgumentNullException("reader");
			if( reader.LocalName == itemsNodeName && ValidateSchema( reader, schemaVersion ) )
			{
				while( reader.Read() )
				{
					if( reader.LocalName == anyItemNodeName && ValidateSchema( reader, schemaVersion ) )
					{
						base.IsAny = true;
					}
					else if( reader.LocalName == itemNodeName && ValidateSchema( reader, schemaVersion ) )
					{
						base.ItemsList.Add( (TargetItemBase)CreateTargetItem( reader ) );
					}
					else if( reader.LocalName == itemsNodeName && 
						reader.NodeType == XmlNodeType.EndElement )
					{
						break;
					}
				}
			}
			else
			{
				throw new Exception( Resource.ResourceManager[ Resource.MessageKey.exc_invalid_node_name, reader.LocalName ] );
			}
		}
开发者ID:Condeti,项目名称:XACML.NET,代码行数:38,代码来源:TargetItemsBase.cs


示例16: ApplyBaseReadWrite

        /// <summary>
        /// Creates an instance of the ApplyBase using the XmlReader positioned in the node and the node name
        /// specifyed by the derived class in the constructor.
        /// </summary>
        /// <param name="reader">The XmlReader positioned at the "nodeName" node.</param>
        /// <param name="nodeName">The name of the node specifies by the derived class.</param>
        /// <param name="schemaVersion">The version of the schema that was used to validate.</param>
        protected ApplyBaseReadWrite(XmlReader reader, string nodeName, XacmlVersion schemaVersion)
            : base(XacmlSchema.Policy, schemaVersion)
        {
            if (reader == null)
            {
                throw new ArgumentNullException("reader");
            }
            if (reader.LocalName == nodeName &&
                    ValidateSchema(reader, schemaVersion))
            {
                // Get the id of function. It will be resolved in evaluation time.
                _functionId = reader.GetAttribute(Consts.Schema1.ConditionElement.FunctionId);

                while (reader.Read())
                {
                    switch (reader.LocalName)
                    {
                        case Consts.Schema1.ApplyElement.Apply:
                            // Must validate if the Apply node is not an EndElement because there is a child node
                            // with the same name as the parent node.
                            if (!reader.IsEmptyElement && reader.NodeType != XmlNodeType.EndElement)
                            {
                                _arguments.Add(new ApplyElement(reader, schemaVersion));
                            }
                            break;
                        case Consts.Schema1.FunctionElement.Function:
                            _arguments.Add(new FunctionElementReadWrite(reader, schemaVersion));
                            break;
                        case Consts.Schema1.AttributeValueElement.AttributeValue:
                            _arguments.Add(new AttributeValueElementReadWrite(reader, schemaVersion));
                            break;
                        case Consts.Schema1.SubjectAttributeDesignatorElement.SubjectAttributeDesignator:
                            _arguments.Add(new SubjectAttributeDesignatorElement(reader, schemaVersion));
                            break;
                        case Consts.Schema1.ResourceAttributeDesignatorElement.ResourceAttributeDesignator:
                            _arguments.Add(new ResourceAttributeDesignatorElement(reader, schemaVersion));
                            break;
                        case Consts.Schema1.ActionAttributeDesignatorElement.ActionAttributeDesignator:
                            _arguments.Add(new ActionAttributeDesignatorElement(reader, schemaVersion));
                            break;
                        case Consts.Schema1.EnvironmentAttributeDesignatorElement.EnvironmentAttributeDesignator:
                            _arguments.Add(new EnvironmentAttributeDesignatorElement(reader, schemaVersion));
                            break;
                        case Consts.Schema1.AttributeSelectorElement.AttributeSelector:
                            _arguments.Add(new AttributeSelectorElement(reader, schemaVersion));
                            break;
                        case Consts.Schema2.VariableReferenceElement.VariableReference:
                            _arguments.Add(new VariableReferenceElement(reader, schemaVersion));
                            break;
                    }
                    if (reader.LocalName == nodeName &&
                        reader.NodeType == XmlNodeType.EndElement)
                    {
                        reader.Read();
                        break;
                    }
                }
            }
        }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:66,代码来源:ApplyBaseReadWrite.cs


示例17: TargetElementReadWrite

		/// <summary>
		/// Creates a new Target with the specified agumetns.
		/// </summary>
		/// <param name="resources">The resources for this target.</param>
		/// <param name="subjects">The subjects for this target.</param>
		/// <param name="actions">The actions for this target.</param>
		/// <param name="environments">The environments for this target.</param>
		/// <param name="schemaVersion">The version of the schema that was used to validate.</param>
		public TargetElementReadWrite(ResourcesElementReadWrite resources, SubjectsElementReadWrite subjects, ActionsElementReadWrite actions, EnvironmentsElementReadWrite environments, XacmlVersion schemaVersion)
			: base(XacmlSchema.Policy, schemaVersion)
		{
			_resources = resources;
			_subjects = subjects;
			_actions = actions;
			_environments = environments;
		}
开发者ID:Condeti,项目名称:XACML.NET,代码行数:16,代码来源:TargetElementReadWrite.cs


示例18: RequestElementReadWrite

		/// <summary>
		/// Creates a new Request using the parameters specified.
		/// </summary>
		/// <param name="subjects">The subjects list.</param>
		/// <param name="resources">The resource requested</param>
		/// <param name="action">The action requested.</param>
		/// <param name="environment">Any environment attribute part of the request.</param>
		/// <param name="schemaVersion">The version of the schema that was used to validate.</param>
		public RequestElementReadWrite( SubjectReadWriteCollection subjects, ResourceReadWriteCollection resources, ActionElementReadWrite action, EnvironmentElementReadWrite environment, XacmlVersion schemaVersion )
			: base( XacmlSchema.Context, schemaVersion )
		{
			_subjects = subjects;
			_resources = resources;
			_action = action;
			_environment = environment;
		}
开发者ID:Condeti,项目名称:XACML.NET,代码行数:16,代码来源:RequestElementReadWrite.cs


示例19: LoadContextDocument

        /// <summary>
        /// Creates an instace of the ContextDocument using the stream provided with an Xml document.
        /// </summary>
        /// <param name="xmlDocument">The stream containing an Xml document.</param>
        /// <param name="schemaVersion">The version of the schema used to validate the document.</param>
        /// <returns>An instance of a ContextDocument.</returns>
        public static ContextDocumentReadWrite LoadContextDocument(Stream xmlDocument, XacmlVersion schemaVersion)
        {
            if (xmlDocument == null)
            {
                throw new ArgumentNullException("xmlDocument");
            }

            return LoadContextDocument(new XmlTextReader(new StreamReader(xmlDocument)), schemaVersion);
        }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:15,代码来源:ContextLoader.cs


示例20: AttributeElementReadWrite

 /// <summary>
 /// Creates an Attribute with the values specified.
 /// </summary>
 /// <param name="attributeId">The attribute id.</param>
 /// <param name="dataType">The data type id.</param>
 /// <param name="issuer">The issuer name.</param>
 /// <param name="issueInstant">The issuer instant.</param>
 /// <param name="value">The value of the attribute.</param>
 /// <param name="schemaVersion">The version of the schema that was used to validate.</param>
 public AttributeElementReadWrite(string attributeId, string dataType, string issuer, string issueInstant, string value, XacmlVersion schemaVersion)
     : base(XacmlSchema.Context, schemaVersion)
 {
     _attributeId = attributeId;
     _dataType = dataType;
     _issuer = issuer;
     _issueInstant = issueInstant;
     _attributeValues.Add(new AttributeValueElementReadWrite(value, schemaVersion));
 }
开发者ID:mingkongbin,项目名称:anycmd,代码行数:18,代码来源:AttributeElementReadWrite.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# XafApplication类代码示例发布时间:2022-05-24
下一篇:
C# XYZ类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap