RightsManagementEncryptionTransform( TransformEnvironment transformEnvironment ) { Debug.Assert(transformEnvironment != null); Stream instanceDataStream = transformEnvironment.GetPrimaryInstanceData(); Debug.Assert(instanceDataStream != null, SR.Get(SRID.NoPublishLicenseStream)); _useLicenseStorage = transformEnvironment.GetInstanceDataStorage(); Debug.Assert(_useLicenseStorage != null, SR.Get(SRID.NoUseLicenseStorage)); // Create a wrapper that manages persistence and comparison of FormatVersion // in our InstanceData stream. We can read/write to this stream as needed (though CompressionTransform // does not because we don't house any non-FormatVersion data in the instance data stream). // We need to give out our current code version so it can compare with any file version as appropriate. _publishLicenseStream = new VersionedStreamOwner( instanceDataStream, new FormatVersion(FeatureName, MinimumReaderVersion, MinimumUpdaterVersion, CurrentFeatureVersion)); }
/// <summary> /// constructor /// </summary> /// <param name="myEnvironment">environment</param> /// <remarks>this should only be used by the DataSpaceManager class</remarks> public CompressionTransform(TransformEnvironment myEnvironment) { _transformEnvironment = myEnvironment; // Create a wrapper that manages persistence and comparison of FormatVersion // in our InstanceData stream. We can read/write to this stream as needed (though CompressionTransform // does not because we don't house any non-FormatVersion data in the instance data stream). // We need to give out our current code version so it can compare with any file version as appropriate. _versionedStreamOwner = new VersionedStreamOwner( _transformEnvironment.GetPrimaryInstanceData(), new FormatVersion(_featureName, _minimumReaderVersion, _minimumUpdaterVersion, _currentFeatureVersion)); }