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

C# Xml.UniqueId类代码示例

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

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



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

示例1: MatchesKeyIdentifierClause

		public void MatchesKeyIdentifierClause ()
		{
			UniqueId id = new UniqueId ();
			X509SecurityToken t = new X509SecurityToken (cert, id.ToString ());
			LocalIdKeyIdentifierClause l =
				new LocalIdKeyIdentifierClause (id.ToString ());
			Assert.IsTrue (t.MatchesKeyIdentifierClause (l), "#1-1");

			l = new LocalIdKeyIdentifierClause ("#" + id.ToString ());
			Assert.IsFalse (t.MatchesKeyIdentifierClause (l), "#1-2");

			X509ThumbprintKeyIdentifierClause h =
				new X509ThumbprintKeyIdentifierClause (cert);
			Assert.IsTrue (t.MatchesKeyIdentifierClause (h), "#2-1");

			h = new X509ThumbprintKeyIdentifierClause (cert2);
			Assert.IsFalse (t.MatchesKeyIdentifierClause (h), "#2-2");

			X509IssuerSerialKeyIdentifierClause i =
				new X509IssuerSerialKeyIdentifierClause (cert);
			Assert.IsTrue (t.MatchesKeyIdentifierClause (i), "#3-1");

			i = new X509IssuerSerialKeyIdentifierClause (cert2);
			Assert.IsFalse (t.MatchesKeyIdentifierClause (i), "#3-2");

			X509RawDataKeyIdentifierClause s =
				new X509RawDataKeyIdentifierClause (cert);
			Assert.IsTrue (t.MatchesKeyIdentifierClause (s), "#4-1");

			s = new X509RawDataKeyIdentifierClause (cert2);
			Assert.IsFalse (t.MatchesKeyIdentifierClause (s), "#4-2");
		}
开发者ID:nlhepler,项目名称:mono,代码行数:32,代码来源:X509SecurityTokenTest.cs


示例2: WsrmAcknowledgmentHeader

 public WsrmAcknowledgmentHeader(ReliableMessagingVersion reliableMessagingVersion, UniqueId sequenceID, SequenceRangeCollection ranges, bool final, int bufferRemaining) : base(reliableMessagingVersion)
 {
     this.sequenceID = sequenceID;
     this.ranges = ranges;
     this.final = final;
     this.bufferRemaining = bufferRemaining;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:WsrmAcknowledgmentHeader.cs


示例3: WsrmHeaderFault

 protected WsrmHeaderFault(bool isSenderFault, string subcode, string faultReason, string exceptionMessage, UniqueId sequenceID, bool faultsInput, bool faultsOutput) : base(isSenderFault, subcode, faultReason, exceptionMessage)
 {
     this.subcode = subcode;
     this.sequenceID = sequenceID;
     this.faultsInput = faultsInput;
     this.faultsOutput = faultsOutput;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:WsrmHeaderFault.cs


示例4: WsrmAcknowledgmentInfo

 private WsrmAcknowledgmentInfo(UniqueId sequenceID, SequenceRangeCollection ranges, bool final, int bufferRemaining, MessageHeaderInfo header) : base(header)
 {
     this.sequenceID = sequenceID;
     this.ranges = ranges;
     this.final = final;
     this.bufferRemaining = bufferRemaining;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:WsrmAcknowledgmentInfo.cs


示例5: TerminateSequence

 public TerminateSequence(ReliableMessagingVersion reliableMessagingVersion, UniqueId identifier, Int64 last)
     : base(true)
 {
     this.reliableMessagingVersion = reliableMessagingVersion;
     this.identifier = identifier;
     this.lastMsgNumber = last;
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:7,代码来源:TerminateSequence.cs


示例6: TransmissionStrategy

        public TransmissionStrategy(ReliableMessagingVersion reliableMessagingVersion, TimeSpan initRtt,
            int maxWindowSize, bool requestAcks, UniqueId id)
        {
            if (initRtt < TimeSpan.Zero)
            {
                if (DiagnosticUtility.ShouldTrace(TraceEventType.Warning))
                {
                    TraceUtility.TraceEvent(TraceEventType.Warning, TraceCode.WsrmNegativeElapsedTimeDetected,
                    SR.GetString(SR.TraceCodeWsrmNegativeElapsedTimeDetected), this);
                }

                initRtt = ReliableMessagingConstants.UnknownInitiationTime;
            }

            if (maxWindowSize <= 0)
            {
                throw Fx.AssertAndThrow("Argument maxWindow size must be positive.");
            }

            this.id = id;
            this.maxWindowSize = this.lossWindowSize = maxWindowSize;
            this.meanRtt = Math.Min((long)initRtt.TotalMilliseconds, Constants.MaxMeanRtt >> Constants.TimeMultiplier) << Constants.TimeMultiplier;
            this.serrRtt = this.meanRtt >> 1;
            this.window = new SlidingWindow(maxWindowSize);
            this.slowStartThreshold = maxWindowSize;
            this.timeout = Math.Max(((200 << Constants.TimeMultiplier) * 2) + this.meanRtt, this.meanRtt + (this.serrRtt << Constants.ChebychevFactor));
            this.quotaRemaining = Int32.MaxValue;
            this.retryTimer = new IOThreadTimer(new Action<object>(OnRetryElapsed), null, true);
            this.requestAcks = requestAcks;
            this.reliableMessagingVersion = reliableMessagingVersion;
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:31,代码来源:TransmissionStrategy.cs


示例7: ServerReliableDuplexSessionChannel

 public ServerReliableDuplexSessionChannel(ReliableChannelListenerBase<IDuplexSessionChannel> listener, IReliableChannelBinder binder, FaultHelper faultHelper, UniqueId inputID, UniqueId outputID) : base(listener, listener, binder)
 {
     this.listener = listener;
     DuplexServerReliableSession session = new DuplexServerReliableSession(this, listener, faultHelper, inputID, outputID);
     base.SetSession(session);
     session.Open(TimeSpan.Zero);
     base.SetConnections();
     if (PerformanceCounters.PerformanceCountersEnabled)
     {
         this.perfCounterId = this.listener.Uri.ToString().ToUpperInvariant();
     }
     if (binder.HasSession)
     {
         try
         {
             base.StartReceiving(false);
         }
         catch (Exception exception)
         {
             if (Fx.IsFatal(exception))
             {
                 throw;
             }
             base.ReliableSession.OnUnknownException(exception);
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:27,代码来源:ServerReliableDuplexSessionChannel.cs


示例8: WriteAckRanges

 internal static void WriteAckRanges(XmlDictionaryWriter writer, ReliableMessagingVersion reliableMessagingVersion, UniqueId sequenceId, SequenceRangeCollection ranges)
 {
     WsrmFeb2005Dictionary dictionary = XD.WsrmFeb2005Dictionary;
     XmlDictionaryString namespaceUri = WsrmIndex.GetNamespace(reliableMessagingVersion);
     writer.WriteStartElement(dictionary.Identifier, namespaceUri);
     writer.WriteValue(sequenceId);
     writer.WriteEndElement();
     if (ranges.Count == 0)
     {
         if (reliableMessagingVersion == ReliableMessagingVersion.WSReliableMessagingFebruary2005)
         {
             ranges = ranges.MergeWith((long) 0L);
         }
         else if (reliableMessagingVersion == ReliableMessagingVersion.WSReliableMessaging11)
         {
             writer.WriteStartElement(DXD.Wsrm11Dictionary.None, namespaceUri);
             writer.WriteEndElement();
         }
     }
     for (int i = 0; i < ranges.Count; i++)
     {
         writer.WriteStartElement(dictionary.AcknowledgementRange, namespaceUri);
         writer.WriteStartAttribute(dictionary.Lower, null);
         SequenceRange range = ranges[i];
         writer.WriteValue(range.Lower);
         writer.WriteEndAttribute();
         writer.WriteStartAttribute(dictionary.Upper, null);
         SequenceRange range2 = ranges[i];
         writer.WriteValue(range2.Upper);
         writer.WriteEndAttribute();
         writer.WriteEndElement();
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:33,代码来源:WsrmAcknowledgmentHeader.cs


示例9: SecurityContextSecurityToken

 internal SecurityContextSecurityToken(SecurityContextSecurityToken sourceToken, string id, byte[] key, UniqueId keyGeneration, DateTime keyEffectiveTime, DateTime keyExpirationTime, ReadOnlyCollection<IAuthorizationPolicy> authorizationPolicies)
     : base()
 {
     _id = id;
     this.Initialize(sourceToken._contextId, key, sourceToken.ValidFrom, sourceToken.ValidTo, authorizationPolicies, sourceToken._isCookieMode, keyGeneration, keyEffectiveTime, keyExpirationTime);
     _cookieBlob = sourceToken._cookieBlob;
     _bootstrapMessageProperty = (sourceToken._bootstrapMessageProperty == null) ? null : (SecurityMessageProperty)sourceToken.BootstrapMessageProperty.CreateCopy();
 }
开发者ID:SoumikMukherjeeDOTNET,项目名称:wcf,代码行数:8,代码来源:SecurityContextSecurityToken.cs


示例10: GetContext

		public SecurityContextSecurityToken GetContext (UniqueId contextId, UniqueId generation)
		{
			Table table;
			if (!cache.TryGetValue (contextId, out table))
				return null;
			SecurityContextSecurityToken ret;
			return table.TryGetValue (generation, out ret) ? ret : null;
		}
开发者ID:nickchal,项目名称:pash,代码行数:8,代码来源:SecurityContextSecurityTokenResolver.cs


示例11: CreateSequence

 public CreateSequence(AddressingVersion addressingVersion, ReliableMessagingVersion reliableMessagingVersion, bool ordered, IClientReliableChannelBinder binder, UniqueId offerIdentifier) : base(true)
 {
     this.addressingVersion = addressingVersion;
     this.reliableMessagingVersion = reliableMessagingVersion;
     this.ordered = ordered;
     this.binder = binder;
     this.offerIdentifier = offerIdentifier;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:CreateSequence.cs


示例12: SecurityContextKeyIdentifierClause

 public SecurityContextKeyIdentifierClause(UniqueId contextId, UniqueId generation, byte[] derivationNonce, int derivationLength)
     : base(null, derivationNonce, derivationLength)
 {
     if (contextId == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("contextId");
     }
     _contextId = contextId;
     _generation = generation;
 }
开发者ID:weshaggard,项目名称:wcf,代码行数:10,代码来源:SecurityContextKeyIdentifierClause.cs


示例13: GetAllContexts

		public Collection<SecurityContextSecurityToken> GetAllContexts (UniqueId contextId)
		{
			Table table;
			if (!cache.TryGetValue (contextId, out table))
				return new Collection<SecurityContextSecurityToken> ();
			SecurityContextSecurityToken [] arr =
				new SecurityContextSecurityToken [table.Count];
			table.Values.CopyTo (arr, 0);
			return new Collection<SecurityContextSecurityToken> (arr);
		}
开发者ID:nickchal,项目名称:pash,代码行数:10,代码来源:SecurityContextSecurityTokenResolver.cs


示例14: DefaultValues

		public void DefaultValues ()
		{
			UniqueId id = new UniqueId ();
			X509SecurityToken t = new X509SecurityToken (cert, id.ToString ());
			Assert.AreEqual (id.ToString (), t.Id, "#1");
			Assert.AreEqual (cert, t.Certificate, "#2");
			Assert.AreEqual (cert.NotBefore.ToUniversalTime (), t.ValidFrom, "#3");
			Assert.AreEqual (cert.NotAfter.ToUniversalTime (), t.ValidTo, "#4");
			Assert.AreEqual (1, t.SecurityKeys.Count, "#5");
		}
开发者ID:nlhepler,项目名称:mono,代码行数:10,代码来源:X509SecurityTokenTest.cs


示例15: ReliableOutputConnection

 public ReliableOutputConnection(UniqueId id, int maxTransferWindowSize, System.ServiceModel.Channels.MessageVersion messageVersion, ReliableMessagingVersion reliableMessagingVersion, TimeSpan initialRtt, bool requestAcks, TimeSpan sendTimeout)
 {
     this.id = id;
     this.messageVersion = messageVersion;
     this.reliableMessagingVersion = reliableMessagingVersion;
     this.sendTimeout = sendTimeout;
     this.strategy = new TransmissionStrategy(reliableMessagingVersion, initialRtt, maxTransferWindowSize, requestAcks, id);
     this.strategy.RetryTimeoutElapsed = new RetryHandler(this.OnRetryTimeoutElapsed);
     this.strategy.OnException = new ComponentExceptionHandler(this.RaiseOnException);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:10,代码来源:ReliableOutputConnection.cs


示例16: DefaultValues

		public void DefaultValues ()
		{
			UniqueId id = new UniqueId ();
			UserNameSecurityToken t = new UserNameSecurityToken ("mono", "poly", id.ToString ());
			Assert.AreEqual (id.ToString (), t.Id, "#1");
			Assert.AreEqual ("mono", t.UserName, "#2");
			Assert.AreEqual ("poly", t.Password,"#3");
			Assert.IsTrue (DateTime.Today.ToUniversalTime () <= t.ValidFrom && DateTime.Now.ToUniversalTime () >= t.ValidFrom, "#4");
			Assert.AreEqual (DateTime.MaxValue.AddDays (-1), t.ValidTo, "#5");
			Assert.AreEqual (0, t.SecurityKeys.Count, "#6");
		}
开发者ID:nlhepler,项目名称:mono,代码行数:11,代码来源:UserNameSecurityTokenTest.cs


示例17: CreateFaultMessage

 public static Message CreateFaultMessage(UniqueId messageID, MessageVersion messageVersion, Fault fault)
 {
     MessageFault fault2 = MessageFault.CreateFault(FaultCode.CreateSenderFaultCode(fault.Code), fault.Reason);
     Message message = Message.CreateMessage(messageVersion, fault2, messageVersion.Addressing.FaultAction);
     message.Headers.Action = fault.Action;
     if (messageID != null)
     {
         message.Headers.RelatesTo = messageID;
     }
     return message;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:11,代码来源:Library.cs


示例18: ProvideUrnFromHeaderFields

        private Guid ProvideUrnFromHeaderFields(UniqueId headerField)
        {
            var urn = new Guid();

            if (headerField != null)
            {
                var possibleUrnAsString = StripFormattingFromHeaderFields(headerField.ToString());
                Guid.TryParseExact(possibleUrnAsString, "D", out urn);
            }
            return urn;
        }
开发者ID:JimInWA,项目名称:tracing-and-logging,代码行数:11,代码来源:Helper.cs


示例19: Create

 public static MessageIDHeader Create(UniqueId messageId, AddressingVersion addressingVersion)
 {
     if (object.ReferenceEquals(messageId, null))
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("messageId"));
     }
     if (addressingVersion == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("addressingVersion"));
     }
     return new MessageIDHeader(messageId, addressingVersion);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:12,代码来源:MessageIDHeader.cs


示例20: AsyncOperationContext

        internal AsyncOperationContext(UniqueId operationId, int maxResults, TimeSpan duration, object userState)
        {
            Fx.Assert(operationId != null, "The operation id must be non null.");
            Fx.Assert(maxResults > 0, "The maxResults parameter must be positive.");
            Fx.Assert(duration > TimeSpan.Zero, "The duration parameter must be positive.");

            this.maxResults = maxResults;
            this.duration = duration;            
            this.userState = userState;
            this.operationId = operationId;
            this.syncRoot = new object();
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:12,代码来源:AsyncOperationContext.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Xml.XmlAttribute类代码示例发布时间:2022-05-26
下一篇:
C# Xml.PrefixHandle类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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