Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / MS / Internal / IO / Packaging / EncryptedPackageFilter.cs / 1305600 / EncryptedPackageFilter.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: // Implements indexing filter for EncryptedPackageEnvelope. // Invoked by XpsFilter if the file/stream being filtered // is an EncryptedPackageEnvelope. // // History: // 07/18/2005: ArindamB: Initial implementation //--------------------------------------------------------------------------- using System; using System.Windows; using System.Runtime.InteropServices; using System.IO.Packaging; using MS.Internal.Interop; namespace MS.Internal.IO.Packaging { #region EncryptedPackageFilter ////// Implements IFilter methods to support indexing on EncryptedPackageEnvelope. /// internal class EncryptedPackageFilter : IFilter { #region Constructor ////// Constructor. /// /// EncryptedPackageEnvelope to filter on internal EncryptedPackageFilter(EncryptedPackageEnvelope encryptedPackage) { if (encryptedPackage == null) { throw new ArgumentNullException("encryptedPackage"); } // // Since CorePropertiesFilter is implemented as // a managed filter (supports IManagedFilter interface), // IndexingFilterMarshaler is used to get IFilter interface out of it. // _filter = new IndexingFilterMarshaler( new CorePropertiesFilter( encryptedPackage.PackageProperties )); } #endregion Constructor #region IFilter methods ////// Initialzes the session for this filter. /// /// usage flags /// number of elements in aAttributes array /// array of FULLPROPSPEC structs to restrict responses ///IFILTER_FLAGS_NONE. Return value is effectively ignored by the caller. public IFILTER_FLAGS Init( [In] IFILTER_INIT grfFlags, [In] uint cAttributes, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] FULLPROPSPEC[] aAttributes) { return _filter.Init(grfFlags, cAttributes, aAttributes); } ////// Returns description of the next chunk. /// ///Chunk descriptor public STAT_CHUNK GetChunk() { return _filter.GetChunk(); } ////// Gets text content corresponding to current chunk. /// /// /// ///Not supported in indexing of core properties. public void GetText(ref uint bufCharacterCount, IntPtr pBuffer) { throw new COMException(SR.Get(SRID.FilterGetTextNotSupported), (int)FilterErrorCode.FILTER_E_NO_TEXT); } ////// Gets the property value corresponding to current chunk. /// ///property value public IntPtr GetValue() { return _filter.GetValue(); } ////// Retrieves an interface representing the specified portion of the object. /// /// /// ///Not implemented. Reserved for future use. public IntPtr BindRegion([In] FILTERREGION origPos, [In] ref Guid riid) { throw new NotImplementedException(SR.Get(SRID.FilterBindRegionNotImplemented)); } #endregion IFilter methods #region Fields ////// Only filtering that is supported on EncryptedPackageEnvelope /// is of core properties. This points to EncryptedPackageCorePropertiesFilter /// wrapped by FilterMarshaler. /// private IFilter _filter = null; #endregion Fields } #endregion EncryptedPackageFilter } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EntityDataSourceStatementEditorForm.cs
- LocalizationCodeDomSerializer.cs
- StringUtil.cs
- DoubleAnimationUsingKeyFrames.cs
- DataGridViewTextBoxEditingControl.cs
- Accessible.cs
- HttpCachePolicy.cs
- XmlWriterSettings.cs
- WaitForChangedResult.cs
- D3DImage.cs
- StaticExtension.cs
- ModelChangedEventArgsImpl.cs
- UnmanagedMarshal.cs
- ErrorActivity.cs
- RoleBoolean.cs
- ColorInterpolationModeValidation.cs
- HeaderUtility.cs
- ZipIOExtraField.cs
- MSAAEventDispatcher.cs
- PriorityRange.cs
- PocoEntityKeyStrategy.cs
- IssuedTokensHeader.cs
- CultureInfo.cs
- BaseHashHelper.cs
- PreProcessInputEventArgs.cs
- ElementUtil.cs
- XmlCustomFormatter.cs
- XmlReflectionImporter.cs
- SQLDecimalStorage.cs
- LogExtentCollection.cs
- OrderingQueryOperator.cs
- ArgumentValueSerializer.cs
- RenderTargetBitmap.cs
- DecoratedNameAttribute.cs
- WindowClosedEventArgs.cs
- RegistrySecurity.cs
- UserValidatedEventArgs.cs
- ChannelTracker.cs
- ContextMarshalException.cs
- SafeTokenHandle.cs
- PropertiesTab.cs
- PrintPreviewControl.cs
- HelpProvider.cs
- XmlSchemaAnnotation.cs
- Registry.cs
- WebPartConnectionsCancelEventArgs.cs
- DoubleLinkList.cs
- MarginCollapsingState.cs
- SecureUICommand.cs
- BufferedWebEventProvider.cs
- HandleRef.cs
- EntityDataSourceDataSelectionPanel.cs
- DetailsViewModeEventArgs.cs
- MailHeaderInfo.cs
- TextRunCacheImp.cs
- ProtectedProviderSettings.cs
- QueryRelOp.cs
- XmlSecureResolver.cs
- SignedXmlDebugLog.cs
- SqlUdtInfo.cs
- DispatchChannelSink.cs
- Vector3dCollection.cs
- EventProxy.cs
- TextElementCollection.cs
- EntityRecordInfo.cs
- TableLayoutPanel.cs
- WindowsScrollBarBits.cs
- PkcsMisc.cs
- SimpleExpression.cs
- Util.cs
- FileBasedResourceGroveler.cs
- Converter.cs
- TraceUtility.cs
- DataSvcMapFile.cs
- CollectionBuilder.cs
- OptimizedTemplateContentHelper.cs
- ServiceParser.cs
- DiagnosticsConfiguration.cs
- NamespaceImport.cs
- SizeAnimation.cs
- SizeAnimationUsingKeyFrames.cs
- GridProviderWrapper.cs
- RegexWriter.cs
- SQLSingle.cs
- RawUIStateInputReport.cs
- WinEventHandler.cs
- RectConverter.cs
- NativeMethods.cs
- OraclePermission.cs
- IItemContainerGenerator.cs
- EmbeddedObject.cs
- SimpleBitVector32.cs
- URLIdentityPermission.cs
- StringUtil.cs
- EntityClassGenerator.cs
- ApplicationSettingsBase.cs
- AutoGeneratedField.cs
- DataGridViewColumnStateChangedEventArgs.cs
- RootProfilePropertySettingsCollection.cs
- DbTransaction.cs