コード例 #1
0
 /// <summary>
 /// Creates a decorator around the given graph collection.
 /// </summary>
 /// <param name="graphCollection">Graph Collection.</param>
 public WrapperGraphCollection(BaseGraphCollection graphCollection)
 {
     if (graphCollection == null)
     {
         throw new ArgumentNullException("graphCollection");
     }
     _graphs               = graphCollection;
     _graphs.GraphAdded   += HandleGraphAdded;
     _graphs.GraphRemoved += HandleGraphRemoved;
 }
コード例 #2
0
        /// <summary>
        /// Creates a new Base Triple Store
        /// </summary>
        /// <param name="graphCollection">Graph Collection to use</param>
        protected BaseTripleStore(BaseGraphCollection graphCollection)
        {
            if (graphCollection == null)
            {
                throw new ArgumentNullException("graphCollection", "Graph Collection must be an non-null instance of a class which derives from BaseGraphCollection");
            }
            this._graphs = graphCollection;

            this.GraphAddedHandler   = new GraphEventHandler(this.OnGraphAdded);
            this.GraphRemovedHandler = new GraphEventHandler(this.OnGraphRemoved);
            this.GraphChangedHandler = new GraphEventHandler(this.OnGraphChanged);
            this.GraphMergedHandler  = new GraphEventHandler(this.OnGraphMerged);
            this.GraphClearedHandler = new GraphEventHandler(this.OnGraphCleared);

            //Attach Handlers to the Graph Collection
            this._graphs.GraphAdded   += this.GraphAddedHandler;
            this._graphs.GraphRemoved += this.GraphRemovedHandler;
        }
コード例 #3
0
 /// <summary>
 /// Creates a new Triple Store using the given Graph collection which may be non-empty
 /// </summary>
 /// <param name="graphCollection">Graph Collection</param>
 public TripleStore(BaseGraphCollection graphCollection)
     : base(graphCollection)
 {
 }
コード例 #4
0
 /// <summary>
 /// Creates a new Thread safe triple store using a thread safe decorator around the given graph collection
 /// </summary>
 /// <param name="collection">Collection</param>
 public ThreadSafeTripleStore(BaseGraphCollection collection)
     : this(new ThreadSafeGraphCollection(collection))
 {
 }
コード例 #5
0
 /// <summary>
 /// Creates a new Thread Safe decorator around the supplied graph collection
 /// </summary>
 /// <param name="graphCollection">Graph Collection</param>
 public ThreadSafeGraphCollection(BaseGraphCollection graphCollection)
     : base(graphCollection)
 {
 }
コード例 #6
0
 /// <summary>
 /// Creates a new decorator over the given graph collection
 /// </summary>
 /// <param name="collection">Graph Collection</param>
 public BaseDemandGraphCollection(BaseGraphCollection collection)
     : base(collection)
 {
 }