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
- CounterSetInstance.cs
- FontFamilyIdentifier.cs
- CellCreator.cs
- PropagatorResult.cs
- SourceElementsCollection.cs
- EdmToObjectNamespaceMap.cs
- LayeredChannelListener.cs
- CubicEase.cs
- WebPartTransformer.cs
- CodePrimitiveExpression.cs
- Aes.cs
- TypeValidationEventArgs.cs
- NetPeerTcpBinding.cs
- StylusPoint.cs
- GradientStop.cs
- ModuleBuilder.cs
- SettingsPropertyWrongTypeException.cs
- MatrixAnimationUsingPath.cs
- NullableDecimalSumAggregationOperator.cs
- coordinatorfactory.cs
- OracleConnection.cs
- CodeCatchClauseCollection.cs
- ResourceManagerWrapper.cs
- Win32Interop.cs
- TextTreeInsertElementUndoUnit.cs
- UnsafeNativeMethods.cs
- SimplePropertyEntry.cs
- SettingsBindableAttribute.cs
- shaper.cs
- XsdDuration.cs
- DataViewManagerListItemTypeDescriptor.cs
- EventData.cs
- CommandEventArgs.cs
- XmlTextEncoder.cs
- TriState.cs
- MenuItemStyleCollection.cs
- Main.cs
- ServicesUtilities.cs
- XslAst.cs
- _RequestCacheProtocol.cs
- DEREncoding.cs
- TCPClient.cs
- XmlAnyAttributeAttribute.cs
- FormatStringEditor.cs
- PtsContext.cs
- SizeAnimationClockResource.cs
- SynchronizedReadOnlyCollection.cs
- CompositeFontInfo.cs
- EditBehavior.cs
- ProcessInputEventArgs.cs
- DataTableNewRowEvent.cs
- ParameterToken.cs
- TimeSpanConverter.cs
- EventDescriptor.cs
- SimpleRecyclingCache.cs
- XmlSchemaParticle.cs
- OrthographicCamera.cs
- DateTimeFormatInfoScanner.cs
- EventLogHandle.cs
- OAVariantLib.cs
- LinqDataSource.cs
- SafeArrayTypeMismatchException.cs
- DisplayMemberTemplateSelector.cs
- TextBox.cs
- DataControlButton.cs
- OpenFileDialog.cs
- BitmapCache.cs
- SafeEventLogWriteHandle.cs
- DesignTimeVisibleAttribute.cs
- TemplateBindingExtension.cs
- SoapEnumAttribute.cs
- WaitHandleCannotBeOpenedException.cs
- FastEncoderWindow.cs
- ConfigPathUtility.cs
- DragSelectionMessageFilter.cs
- DataGridHeadersVisibilityToVisibilityConverter.cs
- ArrangedElement.cs
- ResourceReferenceExpression.cs
- DurableEnlistmentState.cs
- RequestCachePolicyConverter.cs
- CmsUtils.cs
- TextProperties.cs
- Operators.cs
- TraceContext.cs
- WsrmTraceRecord.cs
- LogSwitch.cs
- CompilerCollection.cs
- TextDocumentView.cs
- Boolean.cs
- MenuItemBindingCollection.cs
- StyleCollection.cs
- DelayedRegex.cs
- HMACSHA1.cs
- WorkflowDesignerMessageFilter.cs
- RecommendedAsConfigurableAttribute.cs
- MergeFilterQuery.cs
- SpellerHighlightLayer.cs
- LinkButton.cs
- CompiledRegexRunnerFactory.cs
- DebugHandleTracker.cs