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
- PointAnimation.cs
- MimeTypeMapper.cs
- MessageHeaderInfoTraceRecord.cs
- IssuedTokensHeader.cs
- PassportAuthentication.cs
- ProtocolsConfiguration.cs
- StrokeDescriptor.cs
- InheritanceAttribute.cs
- WorkflowRuntimeService.cs
- TransactionManager.cs
- DataContext.cs
- PropertyPathConverter.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- WeakHashtable.cs
- SafeNativeMethods.cs
- RuntimeHandles.cs
- ComponentManagerBroker.cs
- TextBlock.cs
- SignedXml.cs
- infer.cs
- wmiprovider.cs
- FixedSOMTableRow.cs
- FixedPosition.cs
- ShapeTypeface.cs
- CorrelationManager.cs
- GridViewItemAutomationPeer.cs
- FreezableDefaultValueFactory.cs
- GregorianCalendar.cs
- HwndHostAutomationPeer.cs
- LoadedOrUnloadedOperation.cs
- BindToObject.cs
- Timer.cs
- XmlDictionaryString.cs
- MenuStrip.cs
- DataListItemEventArgs.cs
- TCPListener.cs
- ZipIOCentralDirectoryFileHeader.cs
- TextEvent.cs
- HeaderCollection.cs
- ManualWorkflowSchedulerService.cs
- FocusManager.cs
- AlphaSortedEnumConverter.cs
- MarkupExtensionParser.cs
- PageWrapper.cs
- RoutedEventConverter.cs
- CompModSwitches.cs
- DataSet.cs
- ISSmlParser.cs
- PartitionedStreamMerger.cs
- Sentence.cs
- SecureStringHasher.cs
- ViewKeyConstraint.cs
- ArgumentException.cs
- EntityDataSourceChangingEventArgs.cs
- SynchronizationLockException.cs
- XmlILOptimizerVisitor.cs
- RowType.cs
- ThicknessConverter.cs
- DataSourceControl.cs
- SelectedCellsCollection.cs
- GcSettings.cs
- TimeoutValidationAttribute.cs
- TraceUtility.cs
- CodeMethodInvokeExpression.cs
- BamlResourceDeserializer.cs
- Query.cs
- TemplateBuilder.cs
- XmlDataFileEditor.cs
- MulticastNotSupportedException.cs
- WebServiceEnumData.cs
- DataRowView.cs
- SkewTransform.cs
- SqlBulkCopyColumnMappingCollection.cs
- ListViewCommandEventArgs.cs
- SQLDecimal.cs
- ServiceTimeoutsBehavior.cs
- TemplateField.cs
- Fonts.cs
- SimpleMailWebEventProvider.cs
- KeySpline.cs
- DesignSurfaceManager.cs
- SpecialNameAttribute.cs
- ThreadExceptionDialog.cs
- SchemaElementLookUpTableEnumerator.cs
- ValidationErrorCollection.cs
- AdornerLayer.cs
- SafeRightsManagementHandle.cs
- PublisherIdentityPermission.cs
- CodeAccessPermission.cs
- WizardPanelChangingEventArgs.cs
- StylusCaptureWithinProperty.cs
- WaitHandleCannotBeOpenedException.cs
- SubMenuStyleCollection.cs
- _AutoWebProxyScriptHelper.cs
- OperationParameterInfoCollection.cs
- ResourceSet.cs
- WebEventTraceProvider.cs
- BaseEntityWrapper.cs
- DrawingBrush.cs
- HeaderCollection.cs