You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@@ -0,0 +1,54 @@
|
||||
#region Using directives
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Security;
|
||||
using System.Security.Permissions;
|
||||
using System.Security.Principal;
|
||||
#endregion
|
||||
|
||||
namespace System.Workflow.Activities
|
||||
{
|
||||
[Serializable]
|
||||
internal sealed class IdentityContextData : ILogicalThreadAffinative, ISerializable
|
||||
{
|
||||
internal const string IdentityContext = "__identitycontext__";
|
||||
|
||||
String identity;
|
||||
|
||||
internal IdentityContextData(String identity)
|
||||
{
|
||||
this.identity = identity;
|
||||
}
|
||||
|
||||
private IdentityContextData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
SerializationInfoEnumerator enumerator = info.GetEnumerator();
|
||||
while (enumerator.MoveNext())
|
||||
{
|
||||
if (enumerator.Name.Equals("identity"))
|
||||
{
|
||||
this.identity = (String)enumerator.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[SecurityPermission( SecurityAction.Demand, SerializationFormatter = true)]
|
||||
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
if (this.identity != null)
|
||||
info.AddValue("identity", identity.ToString());
|
||||
}
|
||||
|
||||
internal String Identity
|
||||
{
|
||||
get
|
||||
{
|
||||
return identity;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user