Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / GetImportFileNameRequest.cs / 1 / GetImportFileNameRequest.cs
//------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
namespace Microsoft.InfoCards
{
using System;
using System.IO;
using Microsoft.InfoCards.Diagnostics;
using IDT = Microsoft.InfoCards.Diagnostics.InfoCardTrace;
//
// This class handles a UI request for name of the file to import cards from
//
class GetImportFileNameRequest :UIAgentRequest
{
string m_filename = String.Empty;
//
// Summary
// Create a new request to return the name of the file to use for import
//
public GetImportFileNameRequest( IntPtr rpcHandle, Stream inArgs, Stream outArgs, ClientUIRequest parent )
: base( rpcHandle, inArgs, outArgs, parent )
{
}
protected override void OnMarshalInArgs()
{
}
//
// Summary
// Retrive the file name
//
protected override void OnProcess()
{
if( ParentRequest is ImportRequest )
{
ImportRequest imr = ParentRequest as ImportRequest;
m_filename = imr.ImportedFile;
IDT.Assert( !String.IsNullOrEmpty( m_filename ), "No file name provided for import" );
}
else
{
IDT.Assert( false, "The parent of this request MUST be ImportRequest" );
}
}
//
// Summary
// Serialize the output in the following order
// m_filename
//
//
protected override void OnMarshalOutArgs()
{
BinaryWriter writer = new BinaryWriter( OutArgs, System.Text.Encoding.Unicode );
IDT.TraceDebug( "Serialize the import file name" );
Utility.SerializeString( writer, m_filename );
}
}
}
// 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
- ReceiveCompletedEventArgs.cs
- ItemCheckEvent.cs
- BamlLocalizer.cs
- ReachSerializerAsync.cs
- Argument.cs
- SiteMapNodeItemEventArgs.cs
- DataServicePagingProviderWrapper.cs
- ControlIdConverter.cs
- UriScheme.cs
- DataGridViewCellStateChangedEventArgs.cs
- UnicastIPAddressInformationCollection.cs
- ImageSource.cs
- BindingsCollection.cs
- RuntimeWrappedException.cs
- Int64.cs
- NetworkCredential.cs
- ProfilePropertyNameValidator.cs
- DisplayNameAttribute.cs
- SplitterCancelEvent.cs
- ObfuscationAttribute.cs
- WeakRefEnumerator.cs
- LongPath.cs
- GridViewColumn.cs
- TriState.cs
- CodeMethodInvokeExpression.cs
- UrlMappingsModule.cs
- ClosableStream.cs
- ResXResourceReader.cs
- WebReferencesBuildProvider.cs
- Bits.cs
- LedgerEntry.cs
- ForAllOperator.cs
- ContentHostHelper.cs
- RegistryConfigurationProvider.cs
- WsdlServiceChannelBuilder.cs
- ProcessHostConfigUtils.cs
- PathData.cs
- NumericExpr.cs
- WebInvokeAttribute.cs
- TraceRecord.cs
- DispatchChannelSink.cs
- DataGridPagerStyle.cs
- EditorPartDesigner.cs
- DragEvent.cs
- LinearGradientBrush.cs
- DBConnectionString.cs
- MarshalDirectiveException.cs
- ShaperBuffers.cs
- FormatSettings.cs
- HttpServerChannel.cs
- DataGridViewCellCollection.cs
- HighlightComponent.cs
- SecurityHeader.cs
- CheckBoxFlatAdapter.cs
- Vector3DCollection.cs
- GeneratedView.cs
- ObjectQueryState.cs
- Selector.cs
- XmlTextWriter.cs
- SelectedDatesCollection.cs
- Literal.cs
- AmbiguousMatchException.cs
- Panel.cs
- FileAuthorizationModule.cs
- MimeReflector.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- XsltException.cs
- AspCompat.cs
- Separator.cs
- MimeTypeMapper.cs
- TrustLevel.cs
- LifetimeMonitor.cs
- SafeNativeMethodsCLR.cs
- ItemMap.cs
- MarkerProperties.cs
- SimpleTypeResolver.cs
- DataGridPageChangedEventArgs.cs
- ClientProxyGenerator.cs
- CanonicalXml.cs
- HorizontalAlignConverter.cs
- _LocalDataStore.cs
- GridSplitter.cs
- LabelLiteral.cs
- _ListenerAsyncResult.cs
- WaitHandle.cs
- WebPartDescription.cs
- DictionaryEntry.cs
- LocatorPart.cs
- unsafenativemethodsother.cs
- DynamicFilter.cs
- CodeFieldReferenceExpression.cs
- DesignerAttribute.cs
- CardSpacePolicyElement.cs
- TreeNode.cs
- RegexReplacement.cs
- ToolStripArrowRenderEventArgs.cs
- TreeNodeSelectionProcessor.cs
- PaintEvent.cs
- ServiceDescriptionSerializer.cs
- TransformValueSerializer.cs