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"); }
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"); } }
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"); } }
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 }
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; }
public DatastoreTranslatorProvider(CloudAuthenticator authenticator, DatastoreConfiguration configuration, IIndexContainer indexes) : base(authenticator, configuration, indexes) { }