public ExportOperation(Item item, ExportOperationType type)
        {
            Assert.ArgumentNotNull(item, "item");

            this.Item        = item;
            this.Type        = type;
            this.AccountItem = AccountManager.GetAccountItemForDescendant(item);
        }
        public override bool IsExist(ExportOperationType type, Item accountItem, ID fieldId, string fieldValue)
        {
            bool result;

            Sync.EnterReadLock();
            try
            {
                result =
                    ExportScope.Any(
                        op =>
                        (op.Type & type) == op.Type && op.AccountItem.ID == accountItem.ID &&
                        op.AccountItem.Database.Name == accountItem.Database.Name && op.Item[fieldId] == fieldValue);
            }
            finally
            {
                Sync.ExitReadLock();
            }

            return(result);
        }
 public abstract bool IsExist(ExportOperationType type, Item accountItem, ID fieldId, string fieldValue);
Esempio n. 4
0
 public static bool IsExist(ExportOperationType type, Item accountItem, ID fieldId, string fieldValue)
 {
     return(Provider.IsExist(type, accountItem, fieldId, fieldValue));
 }