Jo Shields 3c1f479b9d Imported Upstream version 4.0.0~alpha1
Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
2015-04-07 09:35:12 +01:00

29 lines
1023 B
C#

// <copyright>
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
namespace Microsoft.Activities.Presentation.Xaml
{
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Reflection;
class DesignerAttributeInfo : AttributeInfo<DesignerAttribute>
{
public override ICollection GetConstructorArguments(DesignerAttribute attribute, ref ConstructorInfo constructor)
{
return new List<object>() { Type.GetType(attribute.DesignerTypeName) };
}
public override ConstructorInfo GetConstructor()
{
Type designerAttributeType = typeof(DesignerAttribute);
ConstructorInfo constructor = designerAttributeType.GetConstructor(new Type[] { typeof(Type) });
SharedFx.Assert(constructor != null, "designerAttribute has a constructor that takes an argument of type System.Type.");
return constructor;
}
}
}