Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Commerce Server SDK > Help writing C#...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 214 of 274
Post > Topic >>

Help writing C# Pipeline component. Newbie.

by "=?Utf-8?B?R2VvZmY=?=" <Geoff@[EMAIL PROTECTED] > May 17, 2005 at 03:12 PM

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

}

}
 




 2 Posts in Topic:
Help writing C# Pipeline component. Newbie.
"=?Utf-8?B?R2VvZmY=?  2005-05-17 15:12:07 
RE: Help writing C# Pipeline component. Newbie.
madhurjoshi@[EMAIL PROTEC  2005-06-03 17:35:34 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 13:26:59 CST 2008.