I am trying to flesh out the C# example template from MSDN but since I am
new I don't know what to do.
For example, I made this pipeline component, compiled it, used PipeReg
successfully, and added my component with the pipeline editor.
When I double click on my component in the pipleline editor and click on
the
tab "Values Read and Written" I don't get anything.
I suppose it is because I don't know what a SAFEARRAY is or how to create
one in C# or how to return it.
Any Ideas?
BTW: I called my pipeline component OldTobey because I figured a Hobbit
would put it in his "pipe" and smoke it. Pipe -> PipeLine.
using System;
using System.Text;
using System.Collections;
using System.Runtime.InteropServices;
using Microsoft.CommerceServer.Runtime;
using Microsoft.CommerceServer.Interop;
using Microsoft.CommerceServer.Interop.Orders;
namespace PipeLineTestOne
{
[GuidAttribute("CA747D26-6F93-4589-8301-B1DDDBC67D2D")]
/// <summary>
/// Summary description for Class1.
/// </summary>
public class OldTobey : IPipelineComponentAdmin,
IPipelineComponent,
IPipelineComponentDescription,
IPersistDictionary
{
public OldTobey()
{
//
// TODO: Add constructor logic here
//
}
#region IPipelineComponentAdmin Members
/// <summary>
/// Get some date from the local variables and set it in a dictionary
/// </summary>
/// <returns></returns>
public object GetConfigData()
{
// IDictionary dict = new DictionaryClass();
//
// dict["File_Location"] = "Some Data";
// dict["To"]= "Some Data";
// dict["From"]= "Some Data";
// dict["Subject"]= "Some Data";
// dict["SMTP_Server"]= "Some Data";
//
// return dict;
return null;
}
/// <summary>
/// Take the values from the dictionary and place them in the local vars
/// or wherever you like.
/// </summary>
/// <param name="pDict"></param>
public void SetConfigData(object pDict)
{
Microsoft.CommerceServer.Runtime.IDictionary dict =
(Microsoft.CommerceServer.Runtime.IDictionary)pDict;
}
#endregion
#region IPipelineComponent Members
public int Execute(object pdis****der, object pdispContext, int lFlags)
{
Microsoft.CommerceServer.Runtime.IDictionary orderDict =
(Microsoft.CommerceServer.Runtime.IDictionary)pdis****der;
Microsoft.CommerceServer.Runtime.IDictionary contextDict =
(Microsoft.CommerceServer.Runtime.IDictionary)pdispContext;
return 0;
}
public void EnableDesign(int fEnable)
{
// TODO: Add OldTobey.EnableDesign implementation
}
#endregion
#region IPipelineComponentDescription Members
public object ContextValuesRead()
{
ArrayList al = new ArrayList();
al.Add("One");
al.Add("Two");
al.Add("Three");
return al.ToArray(typeof(string));
}
public object ValuesWritten()
{
ArrayList al = new ArrayList();
al.Add("One");
al.Add("Two");
al.Add("Three");
return al.ToArray(typeof(string));
}
public object ValuesRead()
{
ArrayList al = new ArrayList();
al.Add("One");
al.Add("Two");
al.Add("Three");
return al.ToArray(typeof(string));
}
#endregion
#region IPersistDictionary Members
public void InitNew()
{
// TODO: Add OldTobey.InitNew implementation
}
public string GetProgID()
{
// TODO: Add OldTobey.GetProgID implementation
return null;
}
public void Load(object pdispDict)
{
// TODO: Add OldTobey.Load implementation
}
public int IsDirty()
{
// TODO: Add OldTobey.IsDirty implementation
return 0;
}
public void Save(object pdispDict, int fSameAsLoad)
{
// TODO: Add OldTobey.Save implementation
}
#endregion
}
}


|