示例#1
0
 /// <summary/>
 public ScopeTransactionAdapter( Scope scope )
     : this(scope, scope.Variables)
 {
     // we create a transaction for the complete scope
     // -> setup a rollback action which removes all variables which were not
     //    known before the transaction started
     myRollbackActions.Add( () =>
         {
             var newVariables = myScope.Variables.Except( myVariables ).ToList();
             newVariables.Foreach( var => myScope.RemoveVariable( var ) );
         } );
 }
示例#2
0
 /// <summary/>
 public ScopeTransactionAdapter( Scope scope, IEnumerable<string> variables )
 {
     myScope = scope;
     myVariables = variables.ToList();
     myRollbackActions = new List<Action>();
 }
示例#3
0
 /// <summary/>
 public ScopeTransactionAdapter( Scope scope, params string[] variables )
     : this(scope, (IEnumerable<string>)variables)
 {
 }
示例#4
0
文件: Scope.cs 项目: bg0jr/Maui
        public Scope( Scope parent )
        {
            Parent = parent;

            myVariables = new Dictionary<string, object>();
        }