Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / Tools / System.Activities.Presentation / System / Activities / Presentation / Xaml / XamlNamespaceHelper.cs / 1305376 / XamlNamespaceHelper.cs
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.Activities.Presentation.Xaml { using System.Activities.Debugger; using System.Activities.Presentation.Model; using System.Collections.Generic; using System.ComponentModel; using System.Runtime; using System.Windows.Markup; internal class XamlNamespaceHelper { internal const string ClrNamespacePrefix = "clr-namespace:"; internal const string ClrNamespaceAssemblyField = ";assembly="; internal static bool TryParseClrNsUri(string xamlNamespace, out string clrNamespace, out string assembly) { clrNamespace = null; assembly = null; if (!xamlNamespace.StartsWith(ClrNamespacePrefix, StringComparison.Ordinal)) { return false; } int clrNsIndex = ClrNamespacePrefix.Length; int assemblyIndex = xamlNamespace.IndexOf(ClrNamespaceAssemblyField, StringComparison.Ordinal); if (assemblyIndex < clrNsIndex) { clrNamespace = xamlNamespace.Substring(clrNsIndex); return true; } clrNamespace = xamlNamespace.Substring(clrNsIndex, assemblyIndex - clrNsIndex); assemblyIndex += ClrNamespaceAssemblyField.Length; assembly = xamlNamespace.Substring(assemblyIndex); return true; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.Activities.Presentation.Xaml { using System.Activities.Debugger; using System.Activities.Presentation.Model; using System.Collections.Generic; using System.ComponentModel; using System.Runtime; using System.Windows.Markup; internal class XamlNamespaceHelper { internal const string ClrNamespacePrefix = "clr-namespace:"; internal const string ClrNamespaceAssemblyField = ";assembly="; internal static bool TryParseClrNsUri(string xamlNamespace, out string clrNamespace, out string assembly) { clrNamespace = null; assembly = null; if (!xamlNamespace.StartsWith(ClrNamespacePrefix, StringComparison.Ordinal)) { return false; } int clrNsIndex = ClrNamespacePrefix.Length; int assemblyIndex = xamlNamespace.IndexOf(ClrNamespaceAssemblyField, StringComparison.Ordinal); if (assemblyIndex < clrNsIndex) { clrNamespace = xamlNamespace.Substring(clrNsIndex); return true; } clrNamespace = xamlNamespace.Substring(clrNsIndex, assemblyIndex - clrNsIndex); assemblyIndex += ClrNamespaceAssemblyField.Length; assembly = xamlNamespace.Substring(assemblyIndex); return true; } } } // 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
- IPPacketInformation.cs
- ExpandCollapseProviderWrapper.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- ParallelTimeline.cs
- AppliedDeviceFiltersEditor.cs
- autovalidator.cs
- NegatedCellConstant.cs
- FixedSOMTableCell.cs
- OleDbErrorCollection.cs
- BeginStoryboard.cs
- TextEditorThreadLocalStore.cs
- CodeChecksumPragma.cs
- GZipStream.cs
- ScriptResourceAttribute.cs
- ECDsa.cs
- Method.cs
- Win32.cs
- DocumentSequenceHighlightLayer.cs
- ClassicBorderDecorator.cs
- DesignerInterfaces.cs
- SqlDataSourceFilteringEventArgs.cs
- CurrentChangedEventManager.cs
- PropertyEntry.cs
- Baml2006KeyRecord.cs
- StringSource.cs
- CodeCommentStatementCollection.cs
- GeometryGroup.cs
- COM2IDispatchConverter.cs
- UserPreferenceChangedEventArgs.cs
- Enlistment.cs
- TreeNodeBinding.cs
- SqlDataSourceStatusEventArgs.cs
- DecimalAnimationBase.cs
- srgsitem.cs
- RewritingValidator.cs
- EventMap.cs
- StdRegProviderWrapper.cs
- SmiMetaDataProperty.cs
- localization.cs
- ObjectQuery.cs
- ColumnHeader.cs
- AppDomainProtocolHandler.cs
- RuntimeHandles.cs
- ListItemCollection.cs
- SpinWait.cs
- SimpleTypesSurrogate.cs
- LockedActivityGlyph.cs
- EnumMember.cs
- WorkerRequest.cs
- MetadataItemEmitter.cs
- TableProviderWrapper.cs
- StreamSecurityUpgradeProvider.cs
- AssemblyBuilder.cs
- DbConvert.cs
- RC2CryptoServiceProvider.cs
- MembershipPasswordException.cs
- ProfileInfo.cs
- HttpListenerPrefixCollection.cs
- xmlglyphRunInfo.cs
- ShaderEffect.cs
- SQLDecimalStorage.cs
- PageClientProxyGenerator.cs
- DataControlPagerLinkButton.cs
- TextTreeTextBlock.cs
- RtfControlWordInfo.cs
- Polyline.cs
- Codec.cs
- Cursor.cs
- FrameDimension.cs
- GridViewCellAutomationPeer.cs
- BridgeDataReader.cs
- PartialArray.cs
- VectorAnimationUsingKeyFrames.cs
- Button.cs
- MessageDecoder.cs
- PropertyPushdownHelper.cs
- TextureBrush.cs
- WebSysDefaultValueAttribute.cs
- ManagementPath.cs
- UnhandledExceptionEventArgs.cs
- CustomCredentialPolicy.cs
- CodeAccessPermission.cs
- DataProtection.cs
- FrameworkElementAutomationPeer.cs
- BulletedList.cs
- XmlSchemaSimpleContentRestriction.cs
- ClientReliableChannelBinder.cs
- FontSourceCollection.cs
- LocalTransaction.cs
- InvokeMethodActivityDesigner.cs
- EntityDataSourceWizardForm.cs
- Stylesheet.cs
- SqlComparer.cs
- ReadOnlyCollection.cs
- HealthMonitoringSectionHelper.cs
- FunctionGenerator.cs
- PageParser.cs
- DefaultTextStore.cs
- SqlTypesSchemaImporter.cs
- CTreeGenerator.cs