Beispiel #1
0
        void SaveVectorData(IGridSerializationHandler grid)
        {
            object[][] vectorData  = grid.GetVectorData();
            Guid[]     vectorGuids = grid.GetVectorGuids();
            Type[]     vectorTypes = grid.GetVectorTypes();

            int numberOfVectors = vectorData.Length;

            for (int i = 0; i < numberOfVectors; ++i)
            {
                Guid     guid       = vectorGuids[i];
                Type     vectorType = vectorTypes[i];
                object[] vector     = vectorData[i];
                if (vector != null)
                {
                    if (guid != Guid.Empty)
                    {
                        dynamicDriver.SaveVector(vectorData[i], vectorType, guid);
                    }
                    else
                    {
                        vectorGuids[i] = dynamicDriver.SaveVector(vectorData[i], vectorType);
                    }
                }
            }
            grid.SetVectorGuids(vectorGuids);
        }
Beispiel #2
0
        public void LoadGridData(IGridSerializationHandler gridSerializationHandler)
        {
            Type[]       vectorTypes = gridSerializationHandler.GetVectorTypes();
            Guid[]       guids       = gridSerializationHandler.GetVectorGuids();
            Partitioning p           = null;

            int numberOfVectors = vectorTypes.Length;

            object[][] vectors = new object[numberOfVectors][];
            for (int i = 0; i < numberOfVectors; ++i)
            {
                Guid guid = guids[i];
                if (guid != Guid.Empty)
                {
                    Type vectorType = vectorTypes[i];
                    vectors[i] = (object[])dynamicDriver.LoadVector(guid, vectorType, ref p);
                }
            }
            gridSerializationHandler.SetVectorData(vectors);
        }
Beispiel #3
0
 void SaveGridData(IGridSerializationHandler grdHandler, IDatabaseInfo database)
 {
     SaveVectorData(grdHandler);
     grdHandler.Database = database;
 }
 public AggregationGridDatabaseMethods(AggregationGrid grid)
 {
     parentGridHandler = grid.ParentGrid.GridSerializationHandler;
     this.grid         = grid;
 }