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
- SoundPlayerAction.cs
- CloseCryptoHandleRequest.cs
- DocumentsTrace.cs
- WsdlHelpGeneratorElement.cs
- ObjectSecurity.cs
- SaveFileDialog.cs
- lengthconverter.cs
- UIInitializationException.cs
- COM2PropertyDescriptor.cs
- MetadataArtifactLoaderCompositeResource.cs
- RangeExpression.cs
- IDataContractSurrogate.cs
- ResourceCategoryAttribute.cs
- SortDescription.cs
- XmlSchemaNotation.cs
- TimeEnumHelper.cs
- DecoderExceptionFallback.cs
- XmlSerializerOperationGenerator.cs
- ResXBuildProvider.cs
- RelationshipEndMember.cs
- BitmapImage.cs
- PassportIdentity.cs
- ClipboardData.cs
- DependencyPropertyDescriptor.cs
- JsonWriter.cs
- AtomicFile.cs
- BuildProviderCollection.cs
- Baml2006KnownTypes.cs
- NetPeerTcpBindingElement.cs
- ExecutionPropertyManager.cs
- DataGridViewColumnCollectionEditor.cs
- WebHostUnsafeNativeMethods.cs
- _SpnDictionary.cs
- DataGridViewDataConnection.cs
- DBSchemaRow.cs
- UserInitiatedRoutedEventPermission.cs
- GeometryGroup.cs
- ManagementInstaller.cs
- TransformProviderWrapper.cs
- OdbcConnectionPoolProviderInfo.cs
- XmlComplianceUtil.cs
- DataConnectionHelper.cs
- _DomainName.cs
- diagnosticsswitches.cs
- ReaderContextStackData.cs
- Run.cs
- ProcessHostFactoryHelper.cs
- GridViewPageEventArgs.cs
- DetailsViewInsertEventArgs.cs
- _KerberosClient.cs
- NumberFormatInfo.cs
- XNodeSchemaApplier.cs
- StrongNameKeyPair.cs
- Socket.cs
- METAHEADER.cs
- StandardTransformFactory.cs
- ParserOptions.cs
- StreamedWorkflowDefinitionContext.cs
- XmlWrappingWriter.cs
- OracleTimeSpan.cs
- SafeRightsManagementSessionHandle.cs
- WebSysDisplayNameAttribute.cs
- ServiceErrorHandler.cs
- ContentHostHelper.cs
- ForEachDesigner.xaml.cs
- Base64WriteStateInfo.cs
- ItemMap.cs
- SolidColorBrush.cs
- LambdaCompiler.Binary.cs
- EdmPropertyAttribute.cs
- WebPartEditorOkVerb.cs
- SimpleTypeResolver.cs
- TextAdaptor.cs
- ByteRangeDownloader.cs
- StrokeFIndices.cs
- HtmlInputControl.cs
- ImageList.cs
- ObjectListDataBindEventArgs.cs
- ExpressionParser.cs
- _ContextAwareResult.cs
- UnmanagedMemoryAccessor.cs
- ChangeBlockUndoRecord.cs
- TextTreePropertyUndoUnit.cs
- DictionarySectionHandler.cs
- SparseMemoryStream.cs
- QilValidationVisitor.cs
- smtpconnection.cs
- RequiredFieldValidator.cs
- DataSet.cs
- CrossSiteScriptingValidation.cs
- StringCollection.cs
- MenuCommand.cs
- DataError.cs
- Module.cs
- NamespaceList.cs
- XmlQualifiedName.cs
- PathSegmentCollection.cs
- TextBox.cs
- UDPClient.cs
- DataRelationCollection.cs