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
- RowToFieldTransformer.cs
- CompositeFontFamily.cs
- DataGridColumn.cs
- CreatingCookieEventArgs.cs
- WebControlsSection.cs
- X509Certificate2.cs
- NullableIntMinMaxAggregationOperator.cs
- DispatchOperationRuntime.cs
- ToolStripSettings.cs
- BaseProcessor.cs
- TimerElapsedEvenArgs.cs
- Tuple.cs
- EdmTypeAttribute.cs
- CacheHelper.cs
- StatusBarDesigner.cs
- AutomationPattern.cs
- ItemsControlAutomationPeer.cs
- PolicyVersion.cs
- ExpressionsCollectionEditor.cs
- Transform.cs
- EmbossBitmapEffect.cs
- ContractInstanceProvider.cs
- AttachmentCollection.cs
- IgnoreDeviceFilterElement.cs
- BitVector32.cs
- DataGridAutomationPeer.cs
- PixelFormatConverter.cs
- MetadataPropertyAttribute.cs
- UnsafeNativeMethods.cs
- AggregateNode.cs
- CompoundFileStreamReference.cs
- DataTablePropertyDescriptor.cs
- ChangeBlockUndoRecord.cs
- PreservationFileReader.cs
- HitTestDrawingContextWalker.cs
- CounterSample.cs
- ArgumentException.cs
- AddInDeploymentState.cs
- ProviderBase.cs
- Compensation.cs
- SqlParameterizer.cs
- ResourceDescriptionAttribute.cs
- DocumentApplication.cs
- EdmError.cs
- InfoCardMasterKey.cs
- NegotiateStream.cs
- StylusButton.cs
- WebPartTracker.cs
- Style.cs
- Subtree.cs
- ParentQuery.cs
- GZipStream.cs
- IDictionary.cs
- TimersDescriptionAttribute.cs
- XmlSchemaElement.cs
- PagesSection.cs
- CodeDirectoryCompiler.cs
- SqlDuplicator.cs
- Base64Encoder.cs
- NameValueFileSectionHandler.cs
- ResourceWriter.cs
- DbModificationClause.cs
- Polyline.cs
- Mouse.cs
- TreeViewAutomationPeer.cs
- Message.cs
- ComponentConverter.cs
- SchemaImporterExtension.cs
- Binding.cs
- RoutedEventHandlerInfo.cs
- InvalidDataContractException.cs
- BinaryReader.cs
- PermissionAttributes.cs
- ExtensionSimplifierMarkupObject.cs
- FixedSOMGroup.cs
- AddInToken.cs
- EntityProxyTypeInfo.cs
- And.cs
- dataSvcMapFileLoader.cs
- OutputCacheProfileCollection.cs
- AccessDataSource.cs
- TextServicesCompartmentContext.cs
- KnownBoxes.cs
- thaishape.cs
- OleDbRowUpdatedEvent.cs
- _ShellExpression.cs
- DiagnosticStrings.cs
- TraceUtils.cs
- StsCommunicationException.cs
- CategoryList.cs
- Membership.cs
- IgnoreSectionHandler.cs
- MatchAttribute.cs
- ProcessHost.cs
- EncodedStreamFactory.cs
- CachedBitmap.cs
- assemblycache.cs
- TagPrefixAttribute.cs
- GatewayIPAddressInformationCollection.cs
- NativeMethods.cs