Ejemplo n.º 1
0
        private SoodaTransaction(Assembly objectsAssembly, SoodaTransactionOptions options, Assembly callingAssembly)
        {
            if (objectsAssembly != null)
            {
                ObjectsAssembly = objectsAssembly;
            }
            else
            {
                SoodaStubAssemblyAttribute[] attrs = (SoodaStubAssemblyAttribute[])callingAssembly.GetCustomAttributes(typeof(SoodaStubAssemblyAttribute), false);
                if (attrs != null && attrs.Length == 1)
                {
                    ObjectsAssembly = attrs[0].Assembly;
                }
                else
                {
                    ObjectsAssembly = DefaultObjectsAssembly;
                }
            }

            this.transactionOptions = options;
            if ((options & SoodaTransactionOptions.Implicit) != 0)
            {
                previousTransaction = _defaultTransactionStrategy.SetDefaultTransaction(this);
            }
        }
Ejemplo n.º 2
0
        private SoodaTransaction(Assembly objectsAssembly, SoodaTransactionOptions options, Assembly callingAssembly)
        {
            if (objectsAssembly != null)
                ObjectsAssembly = objectsAssembly;
            else
            {
                SoodaStubAssemblyAttribute[] attrs = (SoodaStubAssemblyAttribute[]) callingAssembly.GetCustomAttributes(typeof(SoodaStubAssemblyAttribute), false);
                if (attrs != null && attrs.Length == 1)
                    ObjectsAssembly = attrs[0].Assembly;
                else
                    ObjectsAssembly = DefaultObjectsAssembly;
            }

            this.transactionOptions = options;
            if ((options & SoodaTransactionOptions.Implicit) != 0)
            {
                previousTransaction = _defaultTransactionStrategy.SetDefaultTransaction(this);
            }
        }
Ejemplo n.º 3
0
 public SoodaTransaction(Assembly objectsAssembly, SoodaTransactionOptions options) : this(objectsAssembly, options, Assembly.GetCallingAssembly()) { }
Ejemplo n.º 4
0
 public SoodaTransaction(SoodaTransactionOptions options) : this(null, options, Assembly.GetCallingAssembly()) { }
Ejemplo n.º 5
0
 public SoodaTransaction(Assembly objectsAssembly, SoodaTransactionOptions options) : this(objectsAssembly, options, Assembly.GetCallingAssembly())
 {
 }
Ejemplo n.º 6
0
 public SoodaTransaction(SoodaTransactionOptions options) : this(null, options, Assembly.GetCallingAssembly())
 {
 }