Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Net / System / Net / Mail / AlternateView.cs / 1 / AlternateView.cs
using System; using System.IO; using System.Net.Mime; using System.Text; namespace System.Net.Mail { public class AlternateView : AttachmentBase { private LinkedResourceCollection linkedResources; internal AlternateView() { } public AlternateView(string fileName) : base(fileName) { } public AlternateView(string fileName, string mediaType) : base(fileName, mediaType) { } public AlternateView(string fileName, ContentType contentType) : base(fileName, contentType) { } public AlternateView(Stream contentStream) : base(contentStream) { } public AlternateView(Stream contentStream, string mediaType) : base(contentStream, mediaType) { } public AlternateView(Stream contentStream, ContentType contentType) : base(contentStream, contentType) { } public LinkedResourceCollection LinkedResources { get { if (disposed) { throw new ObjectDisposedException(this.GetType().FullName); } if (linkedResources == null) { linkedResources = new LinkedResourceCollection(); } return linkedResources; } } public Uri BaseUri { get { return ContentLocation; } set { ContentLocation = value; } } public static AlternateView CreateAlternateViewFromString(string content){ AlternateView a = new AlternateView(); a.SetContentFromString(content, null, String.Empty); return a; } public static AlternateView CreateAlternateViewFromString(string content, Encoding contentEncoding, string mediaType){ AlternateView a = new AlternateView(); a.SetContentFromString(content, contentEncoding, mediaType); return a; } public static AlternateView CreateAlternateViewFromString(string content, ContentType contentType){ AlternateView a = new AlternateView(); a.SetContentFromString(content, contentType); return a; } protected override void Dispose(bool disposing) { if(disposed){ return; } if (disposing && linkedResources != null) { linkedResources.Dispose(); } base.Dispose(disposing); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ListBindableAttribute.cs
- HandleCollector.cs
- DisableDpiAwarenessAttribute.cs
- OletxTransactionManager.cs
- DoubleAnimationBase.cs
- ExpressionConverter.cs
- SmtpException.cs
- AddingNewEventArgs.cs
- Crc32.cs
- ProfilePropertySettingsCollection.cs
- Point.cs
- ContainsRowNumberChecker.cs
- EventWaitHandle.cs
- OleDbRowUpdatedEvent.cs
- TdsParserSessionPool.cs
- PathGeometry.cs
- DrawingVisualDrawingContext.cs
- FixedPageStructure.cs
- MergablePropertyAttribute.cs
- PropertyKey.cs
- GradientStop.cs
- DbgUtil.cs
- WSHttpBindingBase.cs
- DelegateTypeInfo.cs
- TargetControlTypeCache.cs
- DBPropSet.cs
- CollectionViewSource.cs
- ConfigurationSectionGroup.cs
- ConsumerConnectionPointCollection.cs
- ButtonStandardAdapter.cs
- ThreadLocal.cs
- SecurityTokenProvider.cs
- localization.cs
- ButtonRenderer.cs
- ResizeBehavior.cs
- EntityTemplateUserControl.cs
- Subtree.cs
- AjaxFrameworkAssemblyAttribute.cs
- InvokeBinder.cs
- ContainerUtilities.cs
- MethodToken.cs
- Proxy.cs
- hwndwrapper.cs
- XsdDateTime.cs
- Hashtable.cs
- LogExtent.cs
- SliderAutomationPeer.cs
- DecimalSumAggregationOperator.cs
- DES.cs
- Queue.cs
- StringAnimationUsingKeyFrames.cs
- SqlTopReducer.cs
- FileLevelControlBuilderAttribute.cs
- WebPermission.cs
- TextSchema.cs
- DirectionalLight.cs
- RtType.cs
- UserThread.cs
- ColumnHeader.cs
- Setter.cs
- DomNameTable.cs
- LocationUpdates.cs
- NativeMethods.cs
- QuaternionAnimationBase.cs
- FrameworkElementFactory.cs
- TransactionOptions.cs
- XPathArrayIterator.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- FormsAuthenticationTicket.cs
- AutomationPatternInfo.cs
- ProofTokenCryptoHandle.cs
- AsyncCallback.cs
- ConnectionManager.cs
- LoginAutoFormat.cs
- GlyphElement.cs
- LinqToSqlWrapper.cs
- EndpointDiscoveryMetadataCD1.cs
- TypefaceMetricsCache.cs
- ButtonBaseAutomationPeer.cs
- DataServiceContext.cs
- SamlDelegatingWriter.cs
- ContentElementAutomationPeer.cs
- WpfSharedXamlSchemaContext.cs
- PageClientProxyGenerator.cs
- ViewBase.cs
- XmlSchemaExternal.cs
- RealizationContext.cs
- Ipv6Element.cs
- PassportAuthentication.cs
- Module.cs
- DefaultBinder.cs
- GlyphCollection.cs
- SafeRightsManagementQueryHandle.cs
- GAC.cs
- FileDialog_Vista_Interop.cs
- followingquery.cs
- SqlFacetAttribute.cs
- COSERVERINFO.cs
- UIHelper.cs
- PropertySourceInfo.cs