本文整理汇总了C#中System.Xml.UniqueId类的典型用法代码示例。如果您正苦于以下问题:C# UniqueId类的具体用法?C# UniqueId怎么用?C# UniqueId使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UniqueId类属于System.Xml命名空间,在下文中一共展示了UniqueId类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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");
}
示例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;
}
示例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;
}
示例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;
}
示例5: TerminateSequence
public TerminateSequence(ReliableMessagingVersion reliableMessagingVersion, UniqueId identifier, Int64 last)
: base(true)
{
this.reliableMessagingVersion = reliableMessagingVersion;
this.identifier = identifier;
this.lastMsgNumber = last;
}
示例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;
}
示例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();
}
}
示例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();
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例14: TwoPhaseCommitParticipantEvent
public TwoPhaseCommitParticipantEvent(ParticipantEnlistment participant) : base(participant)
{
MessageHeaders incomingMessageHeaders = OperationContext.Current.IncomingMessageHeaders;
this.faultTo = Library.GetFaultToHeader(incomingMessageHeaders, base.state.ProtocolVersion);
this.replyTo = Library.GetReplyToHeader(incomingMessageHeaders);
this.messageID = incomingMessageHeaders.MessageId;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:TwoPhaseCommitParticipantEvent.cs
示例15: CompletionParticipantEvent
public CompletionParticipantEvent(CompletionEnlistment completion) : base(completion)
{
MessageHeaders incomingMessageHeaders = OperationContext.Current.IncomingMessageHeaders;
this.faultTo = Library.GetFaultToHeader(incomingMessageHeaders, base.state.ProtocolVersion);
this.replyTo = Library.GetReplyToHeader(incomingMessageHeaders);
this.messageID = incomingMessageHeaders.MessageId;
}