Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Markup / Baml2006 / WpfKnownTypeInvoker.cs / 1305600 / WpfKnownTypeInvoker.cs
using System; using System.Collections.Generic; using System.Xaml; using System.Xaml.Schema; namespace System.Windows.Baml2006 { class WpfKnownTypeInvoker : XamlTypeInvoker { WpfKnownType _type; public WpfKnownTypeInvoker(WpfKnownType type) : base(type) { _type = type; } public override object CreateInstance(object[] arguments) { if ((arguments == null || arguments.Length == 0) && _type.DefaultConstructor != null) { return _type.DefaultConstructor.Invoke(); } else if (_type.IsMarkupExtension) { Baml6ConstructorInfo ctorInfo; if(!_type.Constructors.TryGetValue(arguments.Length, out ctorInfo)) { throw new InvalidOperationException(SR.Get(SRID.PositionalArgumentsWrongLength)); } return ctorInfo.Constructor(arguments); } else { return base.CreateInstance(arguments); } } } } // 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
- DPAPIProtectedConfigurationProvider.cs
- RtfControls.cs
- FixedPage.cs
- TreeView.cs
- ViewStateChangedEventArgs.cs
- BitmapSource.cs
- MultiPropertyDescriptorGridEntry.cs
- LinkedResourceCollection.cs
- PlanCompiler.cs
- CodeStatementCollection.cs
- SlotInfo.cs
- WebPartDisplayMode.cs
- SerializerWriterEventHandlers.cs
- UIElement3DAutomationPeer.cs
- ParameterCollection.cs
- DetailsViewDeletedEventArgs.cs
- LocalIdKeyIdentifierClause.cs
- ConstraintEnumerator.cs
- ObjectMaterializedEventArgs.cs
- TimeoutValidationAttribute.cs
- MobileRedirect.cs
- SettingsPropertyCollection.cs
- AutoScrollExpandMessageFilter.cs
- ScriptingProfileServiceSection.cs
- EntityDataSourceDesignerHelper.cs
- OSFeature.cs
- CollectionContainer.cs
- FlowLayoutPanel.cs
- LayoutDump.cs
- InvokeHandlers.cs
- DetailsViewDeleteEventArgs.cs
- DataGridViewCellEventArgs.cs
- HotSpotCollection.cs
- UnicastIPAddressInformationCollection.cs
- SourceElementsCollection.cs
- CredentialCache.cs
- MorphHelper.cs
- SourceLineInfo.cs
- FontFamilyIdentifier.cs
- TabPanel.cs
- SplineQuaternionKeyFrame.cs
- mansign.cs
- DataServiceRequest.cs
- DbCommandTree.cs
- SerializationFieldInfo.cs
- SystemIPInterfaceProperties.cs
- ComponentConverter.cs
- HttpFileCollection.cs
- TranslateTransform3D.cs
- OutputCacheModule.cs
- ApplyHostConfigurationBehavior.cs
- WebServiceResponse.cs
- BitmapDecoder.cs
- ScriptingScriptResourceHandlerSection.cs
- Rotation3DAnimationBase.cs
- DataViewManager.cs
- WebPartHeaderCloseVerb.cs
- TableLayoutRowStyleCollection.cs
- SettingsSavedEventArgs.cs
- ArrayList.cs
- ProcessHostMapPath.cs
- ResolvedKeyFrameEntry.cs
- StaticDataManager.cs
- EventDescriptor.cs
- StringUtil.cs
- FlagsAttribute.cs
- DesignTimeDataBinding.cs
- InvalidPrinterException.cs
- FacetValues.cs
- MasterPageBuildProvider.cs
- SoapServerMethod.cs
- DataGridCaption.cs
- TabControl.cs
- FixedSOMElement.cs
- TableItemPatternIdentifiers.cs
- NumericUpDown.cs
- QueueProcessor.cs
- DragStartedEventArgs.cs
- NonClientArea.cs
- SequentialWorkflowRootDesigner.cs
- HostingEnvironmentWrapper.cs
- WindowsFormsHostPropertyMap.cs
- Stylesheet.cs
- BuildDependencySet.cs
- LoginCancelEventArgs.cs
- SerializableAttribute.cs
- AdapterUtil.cs
- DefinitionUpdate.cs
- PerfProviderCollection.cs
- ConnectionProviderAttribute.cs
- StringUtil.cs
- ToolStripItemTextRenderEventArgs.cs
- MainMenu.cs
- DependencyObject.cs
- List.cs
- SoapAttributeOverrides.cs
- TreeBuilder.cs
- InternalCache.cs
- OutputWindow.cs
- ObjectItemLoadingSessionData.cs