コード例 #1
0
        protected override IIndex AddItemInternal()
        {
            IIndexContainer container = itemContainer as IIndexContainer;

            if (container != null)
            {
                return(container.AddIndex(new Index("NewIndex")));
            }

            throw new InvalidOperationException("No Entity attached to IndexCollectionPresenter");
        }
コード例 #2
0
        protected override void SetItemsOnForm()
        {
            IIndexContainer container = itemContainer as IIndexContainer;

            if (container != null)
            {
                form.Items = container.Indexes;
            }
            else
            {
                throw new InvalidOperationException("No Entity attached to IndexCollectionPresenter");
            }
        }
コード例 #3
0
        protected override void RemoveItemInternal(IIndex obj)
        {
            IIndexContainer container = itemContainer as IIndexContainer;

            if (container != null)
            {
                container.RemoveIndex(obj);
            }
            else
            {
                throw new InvalidOperationException("No Entity attached to IndexCollectionPresenter");
            }
        }
コード例 #4
0
ファイル: DatastoreService.cs プロジェクト: neil-119/GAE-NET
        public DatastoreService(CloudAuthenticator authenticator) : base(authenticator)
        {
            if (authenticator == null)
            {
                throw new ArgumentNullException(nameof(authenticator));
            }

            if (IndexContainer == null)
            {
                IndexContainer = new InMemoryIndexContainer();
            }

            Configuration = new DatastoreConfiguration(); // default config
        }
コード例 #5
0
        protected DatastoreProvider(CloudAuthenticator authenticator, DatastoreConfiguration configuration, IIndexContainer indexContainer)
        {
            if (authenticator == null)
            {
                throw new NullReferenceException(nameof(authenticator));
            }

            if (configuration == null)
            {
                throw new NullReferenceException(nameof(configuration));
            }

            if (indexContainer == null)
            {
                throw new NullReferenceException(nameof(indexContainer));
            }

            Authenticator  = authenticator;
            Configuration  = configuration;
            IndexContainer = indexContainer;
        }
コード例 #6
0
 public DatastoreTranslatorProvider(CloudAuthenticator authenticator, DatastoreConfiguration configuration, IIndexContainer indexes)
     : base(authenticator, configuration, indexes)
 {
 }