Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / NetFx35 / System.ServiceModel.Web / System / UriTemplateMatch.cs / 4 / UriTemplateMatch.cs
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System { using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ServiceModel.Web; using System.Web; public class UriTemplateMatch { Uri baseUri; NameValueCollection boundVariables; object data; NameValueCollection queryParameters; CollectionrelativePathSegments; Uri requestUri; UriTemplate template; Collection wildcardPathSegments; int wildcardSegmentsStartOffset = -1; public UriTemplateMatch() { } public Uri BaseUri // the base address, untouched { get { return this.baseUri; } set { this.baseUri = value; } } public NameValueCollection BoundVariables // result of TryLookup, values are decoded { get { if (this.boundVariables == null) { this.boundVariables = new NameValueCollection(); } return this.boundVariables; } } public object Data { get { return this.data; } set { this.data = value; } } public NameValueCollection QueryParameters // the result of UrlUtility.ParseQueryString (keys and values are decoded) { get { if (this.queryParameters == null) { PopulateQueryParameters(); } return this.queryParameters; } } public Collection RelativePathSegments // entire Path (after the base address), decoded { get { if (this.relativePathSegments == null) { this.relativePathSegments = new Collection (); } return this.relativePathSegments; } } public Uri RequestUri // uri on the wire, untouched { get { return this.requestUri; } set { this.requestUri = value; } } public UriTemplate Template // which one got matched { get { return this.template; } set { this.template = value; } } public Collection WildcardPathSegments // just the Path part matched by "*", decoded { get { if (this.wildcardPathSegments == null) { PopulateWildcardSegments(); } return this.wildcardPathSegments; } } internal void SetQueryParameters(NameValueCollection queryParameters) { this.queryParameters = new NameValueCollection(queryParameters); } internal void SetRelativePathSegments(Collection segments) { Fx.Assert(segments != null, "segments != null"); this.relativePathSegments = segments; } internal void SetWildcardPathSegmentsStart(int startOffset) { Fx.Assert(startOffset >= 0, "startOffset >= 0"); this.wildcardSegmentsStartOffset = startOffset; } void PopulateQueryParameters() { if (this.requestUri != null) { this.queryParameters = UriTemplateHelpers.ParseQueryString(this.requestUri.Query); } else { this.queryParameters = new NameValueCollection(); } } void PopulateWildcardSegments() { if (wildcardSegmentsStartOffset != -1) { this.wildcardPathSegments = new Collection (); for (int i = this.wildcardSegmentsStartOffset; i < this.RelativePathSegments.Count; ++i) { this.wildcardPathSegments.Add(this.RelativePathSegments[i]); } } else { this.wildcardPathSegments = new Collection (); } } } } // 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
- DataGridPagerStyle.cs
- Route.cs
- GeneratedCodeAttribute.cs
- EventSinkHelperWriter.cs
- MarshalByValueComponent.cs
- WorkflowServiceAttributes.cs
- BoolExpressionVisitors.cs
- DbProviderServices.cs
- ImageCodecInfo.cs
- HtmlFormWrapper.cs
- GeneralTransform2DTo3DTo2D.cs
- AspNetHostingPermission.cs
- EntityDesignerBuildProvider.cs
- SafeRightsManagementEnvironmentHandle.cs
- FlowDocumentPaginator.cs
- ActiveXMessageFormatter.cs
- XmlSchemaExporter.cs
- HttpStaticObjectsCollectionBase.cs
- PropertyItemInternal.cs
- Utils.cs
- CompilationSection.cs
- ChtmlTextWriter.cs
- ClientBuildManager.cs
- MissingFieldException.cs
- NetSectionGroup.cs
- QueryCreatedEventArgs.cs
- RegexStringValidatorAttribute.cs
- LogLogRecordEnumerator.cs
- ExceptionRoutedEventArgs.cs
- FormsAuthenticationCredentials.cs
- MenuStrip.cs
- VersionedStream.cs
- CompoundFileReference.cs
- SmiEventStream.cs
- SelectionEditingBehavior.cs
- ViewgenGatekeeper.cs
- TranslateTransform3D.cs
- NoneExcludedImageIndexConverter.cs
- XPathParser.cs
- QueueSurrogate.cs
- WebPartVerbsEventArgs.cs
- UIElementPropertyUndoUnit.cs
- MarginsConverter.cs
- ToolStripPanelRenderEventArgs.cs
- FormView.cs
- PageSettings.cs
- FormatPage.cs
- CalendarDateRangeChangingEventArgs.cs
- HttpStreamFormatter.cs
- MatrixKeyFrameCollection.cs
- MsmqInputChannelListener.cs
- CalendarButton.cs
- PersistenceIOParticipant.cs
- oledbmetadatacolumnnames.cs
- CodeAttributeDeclaration.cs
- ToolStripSplitStackLayout.cs
- MediaElementAutomationPeer.cs
- ZipPackagePart.cs
- TableChangeProcessor.cs
- AutomationProperty.cs
- WebResourceAttribute.cs
- WeakEventManager.cs
- ConfigXmlCDataSection.cs
- CodePropertyReferenceExpression.cs
- OdbcConnectionStringbuilder.cs
- CodeNamespaceCollection.cs
- XpsFilter.cs
- TextLineBreak.cs
- DefaultTextStore.cs
- OdbcInfoMessageEvent.cs
- CollectionConverter.cs
- RoamingStoreFileUtility.cs
- NativeStructs.cs
- ClassicBorderDecorator.cs
- UserNameSecurityToken.cs
- ListViewInsertEventArgs.cs
- ProcessThreadCollection.cs
- SqlDataSourceDesigner.cs
- XmlDesigner.cs
- EventLogPermissionAttribute.cs
- parserscommon.cs
- ChannelSinkStacks.cs
- XmlDataSourceNodeDescriptor.cs
- ResponseStream.cs
- XmlSchema.cs
- DataGridViewRow.cs
- ImportContext.cs
- XPathScanner.cs
- AuthenticateEventArgs.cs
- Debugger.cs
- SQLDouble.cs
- PropertySourceInfo.cs
- CommandDevice.cs
- PerformanceCounterManager.cs
- RegexGroup.cs
- RbTree.cs
- ReceiveContextCollection.cs
- CssStyleCollection.cs
- AppSettingsExpressionBuilder.cs
- IApplicationTrustManager.cs