/// <summary> /// Initializes a new instance of the <see cref="SPBasicSuiteProvider"/> class. /// </summary> /// <param name="picaSuiteData">The filter record provider.</param> /// <param name="propertySuite">The property suite.</param> /// <param name="colorPicker">The color picker.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="picaSuiteData"/> is null. /// </exception> public SPBasicSuiteProvider(IPICASuiteDataProvider picaSuiteData, IPropertySuite propertySuite, IColorPicker colorPicker) { if (picaSuiteData == null) { throw new ArgumentNullException(nameof(picaSuiteData)); } this.picaSuiteData = picaSuiteData; this.propertySuite = propertySuite; this.colorPicker = colorPicker; spAcquireSuite = new SPBasicAcquireSuite(SPBasicAcquireSuite); spReleaseSuite = new SPBasicReleaseSuite(SPBasicReleaseSuite); spIsEqual = new SPBasicIsEqual(SPBasicIsEqual); spAllocateBlock = new SPBasicAllocateBlock(SPBasicAllocateBlock); spFreeBlock = new SPBasicFreeBlock(SPBasicFreeBlock); spReallocateBlock = new SPBasicReallocateBlock(SPBasicReallocateBlock); spUndefined = new SPBasicUndefined(SPBasicUndefined); actionSuites = new ActionSuiteProvider(); activePICASuites = new ActivePICASuites(); descriptorRegistrySuite = null; bufferSuite = null; colorSpaceSuite = null; errorSuite = null; handleSuite = null; disposed = false; }
/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public void Dispose() { if (!disposed) { disposed = true; if (actionSuites != null) { actionSuites.Dispose(); actionSuites = null; } if (activePICASuites != null) { activePICASuites.Dispose(); activePICASuites = null; } if (bufferSuite != null) { bufferSuite.Dispose(); bufferSuite = null; } } }