Example #1
0
    /// <summary> 
    /// Obtains the data space manager object for this instance of the
    /// container.  Subsequent calls will return reference to the same 
    /// object.
    /// </summary>
    /// <returns>Reference to the manager object</returns>
    internal DataSpaceManager GetDataSpaceManager() 
    {
        CheckRootDisposedStatus(); 
        if( null == dataSpaceManager ) 
        {
            if ( dataSpaceManagerInitializationInProgress ) 
                return null;  // initialization in progress - abort

            // Create new instance of data space manager
            dataSpaceManagerInitializationInProgress = true; 
            dataSpaceManager = new DataSpaceManager( this );
            dataSpaceManagerInitializationInProgress = false; 
        } 

        return dataSpaceManager; 
    }
 /// <summary>
 /// This object is only created internally by the data space manager.
 /// </summary>
 /// <param name="host">The data space manager who created this class</param>
 /// <param name="instanceLabel">Text label for this transform instance</param>
 internal TransformEnvironment( DataSpaceManager host, string instanceLabel )
 {
     transformHost = host;
     transformLabel = instanceLabel;
 }
Example #3
0
    /// <summary> 
    /// Clean up this container storage instance
    /// </summary>
    internal void Close()
    { 
        if( null == rootIStorage )
            return; // Extraneous calls to Close() are ignored 
 
        if( null != dataSpaceManager )
        { 
            // Tell data space manager to flush all information as necessary
            dataSpaceManager.Dispose();
            dataSpaceManager = null;
        } 

        try 
        { 
            // Shut down the underlying storage
            if( !containerIsReadOnly ) 
                rootIStorage.Commit(0);
        }
        finally
        { 
            // We need these clean up steps to run even if there's a problem
            //  with the commit above. 
            RecursiveStorageInfoCoreRelease( core ); 

            rootIStorage = null; 
        }
    }