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
- CommandID.cs
- GestureRecognizer.cs
- ADMembershipProvider.cs
- BackStopAuthenticationModule.cs
- EmptyQuery.cs
- ListBox.cs
- DynamicScriptObject.cs
- InputProviderSite.cs
- RequestSecurityTokenForGetBrowserToken.cs
- Compiler.cs
- HwndSourceParameters.cs
- XmlDataLoader.cs
- EventEntry.cs
- ScriptReferenceBase.cs
- ConditionChanges.cs
- DownloadProgressEventArgs.cs
- ResourceContainer.cs
- _ScatterGatherBuffers.cs
- SoapObjectWriter.cs
- HttpDictionary.cs
- XhtmlBasicTextViewAdapter.cs
- ErrorInfoXmlDocument.cs
- IIS7WorkerRequest.cs
- XamlReader.cs
- DataRowComparer.cs
- PaperSource.cs
- Currency.cs
- WebBrowserNavigatedEventHandler.cs
- StringOutput.cs
- PrinterUnitConvert.cs
- HWStack.cs
- AmbientLight.cs
- BaseTreeIterator.cs
- FileNotFoundException.cs
- EncodingTable.cs
- OrderByQueryOptionExpression.cs
- DbModificationCommandTree.cs
- TextBoxAutoCompleteSourceConverter.cs
- ListItemCollection.cs
- CustomError.cs
- XmlTextAttribute.cs
- mediapermission.cs
- CombinedGeometry.cs
- ScriptDescriptor.cs
- WebPartDisplayMode.cs
- BuildDependencySet.cs
- MessageAction.cs
- Array.cs
- PersonalizationDictionary.cs
- EditBehavior.cs
- Message.cs
- ScrollItemProviderWrapper.cs
- StrongNameIdentityPermission.cs
- ListItemCollection.cs
- _NestedMultipleAsyncResult.cs
- TemplateField.cs
- XmlHierarchyData.cs
- ScriptingAuthenticationServiceSection.cs
- Decoder.cs
- RoleManagerModule.cs
- FileDialogCustomPlaces.cs
- ConfigurationSettings.cs
- SqlRetyper.cs
- Padding.cs
- Process.cs
- UserMapPath.cs
- CaseCqlBlock.cs
- SoapAttributeOverrides.cs
- SerializationEventsCache.cs
- SqlConnectionPoolProviderInfo.cs
- ReadOnlyCollection.cs
- BitArray.cs
- ElementFactory.cs
- DelegateArgument.cs
- DrawingGroupDrawingContext.cs
- SqlFunctionAttribute.cs
- DbException.cs
- AnnotationStore.cs
- OdbcParameterCollection.cs
- DesignerSelectionListAdapter.cs
- ExpressionCopier.cs
- webbrowsersite.cs
- XmlSchemaAppInfo.cs
- DecimalStorage.cs
- StoragePropertyMapping.cs
- SchemaElementLookUpTable.cs
- EventsTab.cs
- XPathSelfQuery.cs
- ObjectResult.cs
- ArrayWithOffset.cs
- ApplicationManager.cs
- WeakReferenceEnumerator.cs
- ActiveXContainer.cs
- SkinBuilder.cs
- FrameworkContextData.cs
- RuntimeEnvironment.cs
- InfoCardMetadataExchangeClient.cs
- FilterableAttribute.cs
- FamilyCollection.cs
- BinarySecretKeyIdentifierClause.cs