//*****************************************************************************
// Description.....WF4 Message Mediation Library
//
// Author..........Roman Kiss, rkiss@pathcom.com
// Copyright © 2009 ATZ Consulting Inc. (see included license.rtf file)
//
// Date Created: 07/07/09
//
// Date Modified By Description
//-----------------------------------------------------------------------------
// 07/07/09 Roman Kiss Initial Revision
//
//*****************************************************************************
//
#region Namespaces
using System;
using System.Activities.Presentation.Metadata;
using System.Activities.Presentation.PropertyEditing;
using System.ComponentModel;
//
using RKiss.MessageMediationActivityLibrary.Design.Editors;
#endregion
namespace RKiss.MessageMediationActivityLibrary.Design
{
public class Metadata : IRegisterMetadata
{
public Metadata() { }
public void Register()
{
//Type editor = Type.GetType("System.Activities.Presentation.ArgumentCollectionPropertyEditor, System.Activities.Core.Presentation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");
AttributeTableBuilder builder = new AttributeTableBuilder();
builder.AddCustomAttributes(typeof(CreateMessage), new DesignerAttribute(typeof(CreateMessageDesigner)));
builder.AddCustomAttributes(typeof(CreateMessage), "Mediator", new Attribute[] { new EditorAttribute(typeof(MessageMediationEditor), typeof(PropertyValueEditor)) });
//CategoryAttribute attribute = new CategoryAttribute(EditorCategoryTemplateDictionary.Instance.GetCategoryTitle("endpointCategoryLabel"));
builder.AddCustomAttributes(typeof(SendMessage), "Endpoint", new Attribute[] { /*attribute, */ new TypeConverterAttribute(typeof(ExpandableObjectConverter)) });
builder.AddCustomAttributes(typeof(SendMessage), "Mediator", new Attribute[] { new EditorAttribute(typeof(MessageMediationEditor), typeof(PropertyValueEditor)) });
builder.AddCustomAttributes(typeof(SendMessage), "XPath", new Attribute[] { new EditorAttribute(typeof(MessageXPathEditor), typeof(PropertyValueEditor)) });
builder.AddCustomAttributes(typeof(FireMessage), "Endpoint", new Attribute[] { /*attribute, */ new TypeConverterAttribute(typeof(ExpandableObjectConverter)) });
builder.AddCustomAttributes(typeof(FireMessage), "Mediator", new Attribute[] { new EditorAttribute(typeof(MessageMediationEditor), typeof(PropertyValueEditor)) });
builder.AddCustomAttributes(typeof(Transform), new DesignerAttribute(typeof(TransformDesigner)));
builder.AddCustomAttributes(typeof(Transform), "Mediator", new Attribute[] { new EditorAttribute(typeof(XmlValueExpressionEditor), typeof(PropertyValueEditor)) });
builder.AddCustomAttributes(typeof(XPathMessageInspector), new DesignerAttribute(typeof(XPathMessageInspectorDesigner)));
builder.AddCustomAttributes(typeof(XPathMessageInspector), "XPath", new Attribute[] { new EditorAttribute(typeof(MessageXPathEditor), typeof(PropertyValueEditor)) });
Type attrType = Type.GetType("System.Activities.Presentation.FeatureAttribute, System.Activities.Presentation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");
Type argType = Type.GetType("System.Activities.Presentation.UpdatableGenericArgumentsFeature, System.Activities.Presentation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");
builder.AddCustomAttributes(typeof(Assign2<>), new Attribute[] { Activator.CreateInstance(attrType, new object[] { argType }) as Attribute });
MetadataStore.AddAttributeTable(builder.CreateTable());
}
}
}