Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / Mail / LinkedResource.cs / 1305376 / LinkedResource.cs
using System; using System.IO; using System.Net.Mime; using System.Text; using System.Runtime.Versioning; namespace System.Net.Mail { public class LinkedResource : AttachmentBase { internal LinkedResource() { } [ResourceExposure(ResourceScope.Machine)] [ResourceConsumption(ResourceScope.Machine)] public LinkedResource(string fileName) : base(fileName) { } [ResourceExposure(ResourceScope.Machine)] [ResourceConsumption(ResourceScope.Machine)] public LinkedResource(string fileName, string mediaType) : base(fileName, mediaType) { } [ResourceExposure(ResourceScope.Machine)] [ResourceConsumption(ResourceScope.Machine)] public LinkedResource(string fileName, ContentType contentType) : base(fileName, contentType) { } public LinkedResource(Stream contentStream) : base(contentStream) { } public LinkedResource(Stream contentStream, string mediaType) : base(contentStream, mediaType) { } public LinkedResource(Stream contentStream, ContentType contentType) : base(contentStream, contentType) { } public Uri ContentLink { get { return ContentLocation; } set { ContentLocation = value; } } public static LinkedResource CreateLinkedResourceFromString(string content){ LinkedResource a = new LinkedResource(); a.SetContentFromString(content, null, String.Empty); return a; } public static LinkedResource CreateLinkedResourceFromString(string content, Encoding contentEncoding, string mediaType){ LinkedResource a = new LinkedResource(); a.SetContentFromString(content, contentEncoding, mediaType); return a; } public static LinkedResource CreateLinkedResourceFromString(string content, ContentType contentType){ LinkedResource a = new LinkedResource(); a.SetContentFromString(content, contentType); return a; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.IO; using System.Net.Mime; using System.Text; using System.Runtime.Versioning; namespace System.Net.Mail { public class LinkedResource : AttachmentBase { internal LinkedResource() { } [ResourceExposure(ResourceScope.Machine)] [ResourceConsumption(ResourceScope.Machine)] public LinkedResource(string fileName) : base(fileName) { } [ResourceExposure(ResourceScope.Machine)] [ResourceConsumption(ResourceScope.Machine)] public LinkedResource(string fileName, string mediaType) : base(fileName, mediaType) { } [ResourceExposure(ResourceScope.Machine)] [ResourceConsumption(ResourceScope.Machine)] public LinkedResource(string fileName, ContentType contentType) : base(fileName, contentType) { } public LinkedResource(Stream contentStream) : base(contentStream) { } public LinkedResource(Stream contentStream, string mediaType) : base(contentStream, mediaType) { } public LinkedResource(Stream contentStream, ContentType contentType) : base(contentStream, contentType) { } public Uri ContentLink { get { return ContentLocation; } set { ContentLocation = value; } } public static LinkedResource CreateLinkedResourceFromString(string content){ LinkedResource a = new LinkedResource(); a.SetContentFromString(content, null, String.Empty); return a; } public static LinkedResource CreateLinkedResourceFromString(string content, Encoding contentEncoding, string mediaType){ LinkedResource a = new LinkedResource(); a.SetContentFromString(content, contentEncoding, mediaType); return a; } public static LinkedResource CreateLinkedResourceFromString(string content, ContentType contentType){ LinkedResource a = new LinkedResource(); a.SetContentFromString(content, contentType); return a; } } } // 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
- controlskin.cs
- RsaEndpointIdentity.cs
- Type.cs
- EntityDataSourceSelectingEventArgs.cs
- SudsCommon.cs
- UrlAuthFailedErrorFormatter.cs
- XmlSchemaInclude.cs
- QueryOperatorEnumerator.cs
- CurrentTimeZone.cs
- HwndTarget.cs
- Currency.cs
- SqlServices.cs
- ObjectHelper.cs
- HostedElements.cs
- BitmapEffect.cs
- LogEntrySerializationException.cs
- PolyLineSegment.cs
- CultureSpecificCharacterBufferRange.cs
- PropertyMapper.cs
- PageStatePersister.cs
- Monitor.cs
- XmlSchemaFacet.cs
- ErrorFormatterPage.cs
- WebPartConnectVerb.cs
- PersistenceContextEnlistment.cs
- RelativeSource.cs
- Attribute.cs
- FileRecordSequenceHelper.cs
- WindowPattern.cs
- BitmapEffectGroup.cs
- CallbackTimeoutsElement.cs
- SolidBrush.cs
- OrderedDictionary.cs
- XmlDataSourceView.cs
- SrgsElementFactoryCompiler.cs
- InternalEnumValidatorAttribute.cs
- ButtonField.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- ComponentResourceManager.cs
- CompressedStack.cs
- EqualityComparer.cs
- MatcherBuilder.cs
- TransformerInfoCollection.cs
- AsyncResult.cs
- ExpressionBuilder.cs
- SQLInt64Storage.cs
- ChannelSinkStacks.cs
- EntityDataSourceStatementEditor.cs
- AttributeTable.cs
- AttributeEmitter.cs
- CodeTypeMember.cs
- FontUnit.cs
- PasswordBox.cs
- ObjectDataProvider.cs
- IODescriptionAttribute.cs
- MessageLoggingElement.cs
- SqlTriggerAttribute.cs
- HostUtils.cs
- FixedNode.cs
- RestHandlerFactory.cs
- RoleManagerSection.cs
- DrawTreeNodeEventArgs.cs
- ToolStripGrip.cs
- XmlAutoDetectWriter.cs
- AdCreatedEventArgs.cs
- BufferModesCollection.cs
- WebException.cs
- ServiceOperationParameter.cs
- PropertyGridDesigner.cs
- InvalidAsynchronousStateException.cs
- TypeSchema.cs
- Geometry3D.cs
- MouseDevice.cs
- MouseDevice.cs
- DictionaryEntry.cs
- FixUpCollection.cs
- ColumnClickEvent.cs
- SchemaObjectWriter.cs
- SerializableAttribute.cs
- ProgressBarRenderer.cs
- MDIClient.cs
- StringStorage.cs
- TrackingStringDictionary.cs
- PageSettings.cs
- SecurityUtils.cs
- UnicodeEncoding.cs
- Light.cs
- SatelliteContractVersionAttribute.cs
- CacheSection.cs
- XsltConvert.cs
- _AutoWebProxyScriptHelper.cs
- DataGridViewButtonColumn.cs
- SessionStateModule.cs
- DataGridViewRowCollection.cs
- SqlInternalConnectionTds.cs
- XmlEnumAttribute.cs
- XPathNode.cs
- WebUtil.cs
- XsltException.cs
- StylusEditingBehavior.cs