e79aa3c0ed
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
56 lines
1.4 KiB
C#
56 lines
1.4 KiB
C#
//------------------------------------------------------------
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
//------------------------------------------------------------
|
|
|
|
namespace System.ServiceModel.Security
|
|
{
|
|
using System.IdentityModel.Claims;
|
|
using System.ServiceModel;
|
|
using System.IdentityModel.Policy;
|
|
using System.ServiceModel.Security.Tokens;
|
|
using System.Xml;
|
|
|
|
using ISecurityElement = System.IdentityModel.ISecurityElement;
|
|
|
|
class SendSecurityHeaderElement
|
|
{
|
|
string id;
|
|
ISecurityElement item;
|
|
bool markedForEncryption;
|
|
|
|
public SendSecurityHeaderElement(string id, ISecurityElement item)
|
|
{
|
|
this.id = id;
|
|
this.item = item;
|
|
markedForEncryption = false;
|
|
}
|
|
|
|
public string Id
|
|
{
|
|
get { return this.id; }
|
|
}
|
|
|
|
public ISecurityElement Item
|
|
{
|
|
get { return this.item; }
|
|
}
|
|
|
|
public bool MarkedForEncryption
|
|
{
|
|
get { return this.markedForEncryption; }
|
|
set { this.markedForEncryption = value; }
|
|
}
|
|
|
|
public bool IsSameItem(ISecurityElement item)
|
|
{
|
|
return this.item == item || this.item.Equals(item);
|
|
}
|
|
|
|
public void Replace(string id, ISecurityElement item)
|
|
{
|
|
this.item = item;
|
|
this.id = id;
|
|
}
|
|
}
|
|
}
|