public IDisposable CreateSecurityScope(BaseSecurityContext s = null)
        {
            var old = this.SecurityContext;

            this.SecurityContext = s;
            return(new DisposableAction(() => {
                this.SecurityContext = old;
            }));
        }
Example #2
0
        /// <summary>
        /// Creates new Security Scope
        /// </summary>
        /// <param name="sc"></param>
        /// <returns></returns>
        public IDisposable CreateSecurityScope(BaseSecurityContext sc = null)
        {
            var current = this.SecurityContext;

            this.SecurityContext = sc;
            return(new DisposableAction(() => {
                this.SecurityContext = current;
            }));
        }
         public AtomJavaScriptSerializer(BaseSecurityContext sc, bool json = true)
 		{
 			this.json = json;
             this.SecurityContext = sc;
 		}
 public AtomJavaScriptSerializer(BaseSecurityContext sc, bool json = true)
 {
     this.json            = json;
     this.SecurityContext = sc;
 }