Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / ManagedLibraries / Remoting / Channels / TCP / TcpChannelHelper.cs / 1305376 / TcpChannelHelper.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== //========================================================================== // File: TcpChannelHelper.cs // // Summary: Implements helper methods for tcp client and server channels. // //========================================================================= using System; using System.Text; using System.Runtime.Remoting.Channels; namespace System.Runtime.Remoting.Channels.Tcp { internal static class TcpChannelHelper { private const String _tcp = "tcp://"; // Used by tcp channels to implement IChannel::Parse. // It returns the channel uri and places object uri into out parameter. internal static String ParseURL(String url, out String objectURI) { // Set the out parameters objectURI = null; int separator; // Find the starting point of tcp:// // NOTE: We are using this version of String.Compare to ensure // that string operations are case-insensitive!! if (StringHelper.StartsWithAsciiIgnoreCasePrefixLower(url, _tcp)) { separator = _tcp.Length; } else { return null; } // find next slash (after end of scheme) separator = url.IndexOf('/', separator); if (-1 == separator) { return url; // means that the url is just "tcp://foo:90" or something like that } // Extract the channel URI which is the prefix String channelURI = url.Substring(0, separator); // Extract the object URI which is the suffix objectURI = url.Substring(separator); // leave the slash return channelURI; } // ParseURL } // class TcpChannelHelper } // namespace System.Runtime.Remoting.Channels.Tcp // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HttpsHostedTransportConfiguration.cs
- PartialTrustVisibleAssembly.cs
- MultiplexingFormatMapping.cs
- MethodExpression.cs
- XmlElementList.cs
- BaseCAMarshaler.cs
- UpdatePanelTrigger.cs
- UriTemplateLiteralPathSegment.cs
- AnonymousIdentificationSection.cs
- CompilerLocalReference.cs
- Type.cs
- SerialStream.cs
- EmptyEnumerator.cs
- DataObjectPastingEventArgs.cs
- RealProxy.cs
- StateMachineHelpers.cs
- BodyWriter.cs
- PersistChildrenAttribute.cs
- UseLicense.cs
- BaseUriHelper.cs
- KeyboardDevice.cs
- MouseEvent.cs
- LiteralSubsegment.cs
- MetadataWorkspace.cs
- WCFModelStrings.Designer.cs
- MouseActionConverter.cs
- SettingsSection.cs
- BamlResourceSerializer.cs
- VersionConverter.cs
- Process.cs
- ResourceIDHelper.cs
- VariableQuery.cs
- TransformerInfo.cs
- _SSPISessionCache.cs
- StreamDocument.cs
- WebRequestModuleElementCollection.cs
- ConfigurationPropertyAttribute.cs
- LiteralDesigner.cs
- __TransparentProxy.cs
- StringInfo.cs
- ApplicationCommands.cs
- PathSegmentCollection.cs
- ListViewItem.cs
- BigInt.cs
- DataServiceExpressionVisitor.cs
- CapabilitiesState.cs
- StringUtil.cs
- MarkupCompilePass1.cs
- StringSorter.cs
- XamlSerializationHelper.cs
- WrappedReader.cs
- GenericWebPart.cs
- HostVisual.cs
- formatstringdialog.cs
- Matrix.cs
- ClientBuildManagerCallback.cs
- TextEndOfLine.cs
- CalendarDesigner.cs
- PrintDialog.cs
- RadialGradientBrush.cs
- CommonDialog.cs
- TrackingMemoryStreamFactory.cs
- XmlElement.cs
- DataSourceView.cs
- HierarchicalDataSourceIDConverter.cs
- InlinedAggregationOperator.cs
- SchemaNames.cs
- GridViewCellAutomationPeer.cs
- CounterSampleCalculator.cs
- Base64Encoder.cs
- DeferredElementTreeState.cs
- DataGrid.cs
- CodeThrowExceptionStatement.cs
- Int32AnimationBase.cs
- UnsafeNativeMethods.cs
- ViewGenerator.cs
- DialogResultConverter.cs
- TablePattern.cs
- PopOutPanel.cs
- HtmlInputSubmit.cs
- SemanticResultValue.cs
- PropertyManager.cs
- CultureTable.cs
- Flattener.cs
- PackageDigitalSignatureManager.cs
- WindowsEditBox.cs
- SQLChars.cs
- unsafenativemethodstextservices.cs
- InstanceCreationEditor.cs
- ISCIIEncoding.cs
- HttpModulesSection.cs
- FormCollection.cs
- XmlILStorageConverter.cs
- Point3DKeyFrameCollection.cs
- JavaScriptString.cs
- TextTreeRootTextBlock.cs
- NativeMethodsOther.cs
- AbstractDataSvcMapFileLoader.cs
- ConfigurationStrings.cs
- NamedServiceModelExtensionCollectionElement.cs