Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / Tools / System.Activities.Presentation / System / Activities / Presentation / View / ImportedNamespaceContextItem.cs / 1305376 / ImportedNamespaceContextItem.cs
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.Activities.Presentation.Hosting { using System; using System.Runtime; using System.Collections.ObjectModel; using System.Activities.Presentation.Services; using System.Activities.Presentation.Model; [Fx.Tag.XamlVisible(false)] public sealed class ImportedNamespaceContextItem : ContextItem { bool initialized = false; CollectionimportedNamespaces; public Collection ImportedNamespaces { get { if (this.importedNamespaces == null) { initialized = true; this.importedNamespaces = new Collection (); } return this.importedNamespaces; } } public override Type ItemType { get { return typeof(ImportedNamespaceContextItem); } } public void EnsureInitialized(EditingContext context) { if (!initialized) { ModelService modelService = context.Services.GetService (); Fx.Assert(modelService != null, "ModelService shouldn't be null in EditingContext."); Fx.Assert(modelService.Root != null, "model must have a root"); ModelItemCollection importsModelItem = modelService.Root.Properties[NamespaceListPropertyDescriptor.ImportCollectionPropertyName].Collection; Fx.Assert(importsModelItem != null, "root must have imports"); foreach (ModelItem import in importsModelItem) { this.ImportedNamespaces.Add(import.Properties[NamespaceListPropertyDescriptor.NamespacePropertyName].ComputedValue as string); } } } } } // 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
- ReplyChannelBinder.cs
- ListView.cs
- DelegatingConfigHost.cs
- UnsafeNativeMethods.cs
- ControlUtil.cs
- documentsequencetextpointer.cs
- TextDecorationUnitValidation.cs
- TdsParserSafeHandles.cs
- HtmlTernaryTree.cs
- HtmlInputImage.cs
- ResourceSetExpression.cs
- PackageFilter.cs
- QuaternionAnimationUsingKeyFrames.cs
- DelegateSerializationHolder.cs
- TimeSpanStorage.cs
- TypefaceMap.cs
- CatalogPartChrome.cs
- FrugalMap.cs
- ConsoleCancelEventArgs.cs
- Models.cs
- DataGridTable.cs
- Rfc2898DeriveBytes.cs
- SafeMILHandle.cs
- QuaternionRotation3D.cs
- GridItemCollection.cs
- ViewCellSlot.cs
- AttachmentCollection.cs
- CrossAppDomainChannel.cs
- QilPatternVisitor.cs
- ScriptResourceMapping.cs
- TextDecorations.cs
- FlowDocumentView.cs
- StateBag.cs
- ContainerUIElement3D.cs
- EventHandlersStore.cs
- MenuAutoFormat.cs
- AuthorizationRuleCollection.cs
- NegotiationTokenAuthenticator.cs
- PropertyRef.cs
- WebPartConnectionsCancelVerb.cs
- ResourceDictionary.cs
- MapPathBasedVirtualPathProvider.cs
- MatrixIndependentAnimationStorage.cs
- XmlQueryCardinality.cs
- IndexedGlyphRun.cs
- StrongNameIdentityPermission.cs
- OutputCacheProfile.cs
- ResourceDescriptionAttribute.cs
- ScriptComponentDescriptor.cs
- HttpApplication.cs
- SortableBindingList.cs
- Enum.cs
- TextCharacters.cs
- basecomparevalidator.cs
- InkPresenter.cs
- MultipartContentParser.cs
- XmlDictionaryReader.cs
- XamlSerializationHelper.cs
- MultiSelectRootGridEntry.cs
- RSACryptoServiceProvider.cs
- RenderTargetBitmap.cs
- XmlNodeChangedEventArgs.cs
- HtmlObjectListAdapter.cs
- PenThreadPool.cs
- ChangePasswordDesigner.cs
- ElementNotEnabledException.cs
- NativeWindow.cs
- ProfileBuildProvider.cs
- RoleExceptions.cs
- LZCodec.cs
- TextWriterEngine.cs
- DataGridViewRowPrePaintEventArgs.cs
- __ConsoleStream.cs
- LogicalExpressionEditor.cs
- CompleteWizardStep.cs
- HwndSource.cs
- MeasurementDCInfo.cs
- OuterGlowBitmapEffect.cs
- ClientData.cs
- PartitionResolver.cs
- StringValueSerializer.cs
- DataGridToolTip.cs
- SaveRecipientRequest.cs
- DataGridColumnHeadersPresenterAutomationPeer.cs
- SrgsRule.cs
- BuildProvider.cs
- AsyncDataRequest.cs
- LogicalExpressionEditor.cs
- GlobalProxySelection.cs
- FragmentNavigationEventArgs.cs
- SQLDecimalStorage.cs
- ChildTable.cs
- DurationConverter.cs
- OleDbInfoMessageEvent.cs
- HttpRawResponse.cs
- Nullable.cs
- WebPartDisplayMode.cs
- XPathNavigator.cs
- TraceSection.cs
- Translator.cs