System.Security.SecurityContext.CreateCopy C# (CSharp) Method

CreateCopy() public method

public CreateCopy ( ) : SecurityContext
return SecurityContext
        public SecurityContext CreateCopy()
        {
            throw new NotSupportedException();
        }

Same methods

SecurityContext::CreateCopy ( ) : System.Security.SecurityContext

Usage Example

        protected void ScheduleWithContext(SecurityContext context)
        {
            if (context == null)
            {
                throw Fx.Exception.ArgumentNull("context");
            }
            if (isScheduled)
            {
                throw Fx.Exception.AsError(new InvalidOperationException(InternalSR.ActionItemIsAlreadyScheduled));
            }

            this.isScheduled = true;
            this.context = context.CreateCopy();
            ScheduleCallback(CallbackHelper.InvokeWithContextCallback);
        }