|
Home > Archive > Commerce Server General > September 2004 > C# Pipeline Question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
C# Pipeline Question
|
|
| Ravi Shankar 2004-09-13, 7:47 am |
| There is a HOWTO: Article which should provide you with
the startup template and the best bet for the rest of the
questions is the "Commerce Server 2002" Documentation

>-----Original Message-----
>Hi,
>Does anyone have any idea how to code Pipeline
components in c#. I
>have the following template from MS, but what do you do
with it. Where
>do you put code? Where is the OrderForm object sent in
and how do you
>do modifications on it.
>Thanks.
>
>
>http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/csvr2002/htm/cs_pp_buildingpipecomps_gazs.asp
>using System;
>using System.Runtime.InteropServices;
>using Microsoft.CommerceServer.Runtime;
>using Microsoft.CommerceServer.Interop;
>using Microsoft.CommerceServer.Interop.Orders;
>
>namespace Commerce
>
>{
> [GuidAttribute("7BB430D4-5DD0-4ed9-B453-A93AB813E540")]
>
> public class CSharpTemplate : IPipelineComponentAdmin,
> IPipelineComponent,
>
IPipelineComponentDescription,
> IPersistDictionary
> {
> public CSharpTemplate(){this.InitNew();}
> public String GetProgID(){return null; }
> public void InitNew(){}
> public Int32 IsDirty(){return 0; }
> public void Load(Object pDispDict){}
> public void Save(Object pDispDict, Int32 fSameAsLoad)
{}
> public Int32 Execute(Object pdispOrder, Object
pdispContext, Int32
>Flags){return 0;}
> public void EnableDesign(Int32 fEnable){}
> public Object GetConfigData(){return null;}
> public void SetConfigData(Object pdispDict){}
> public System.Object ContextValuesRead(){return
null;}
> public System.Object ValuesRead(){return null;}
> public System.Object ValuesWritten(){return null;}
> }
>}
>.
>
| |
| Andre Podnozov [MSFT] 2004-09-22, 9:47 pm |
| The main logic of your pipeline component resides in the Execute() method.
Unfortunately you will not get the OrderForm object in C# sense, you will
get passed an Order Dictionary (pdispOrder argument). This dictionary is
like a key/value pair list. You can cast this object to
Microsoft.CommerceServer.Runtime.IDictionary interface which is defined in
MSCSCoreLib.dll, then just access the elements through the indexer:
IDictionary dict = (IDictionary)pdispOrder;
dict["foo"] = "bar";
Thanks,
Andre
This posting is provided "AS IS" with no warranties, and confers no rights.
EBusiness Server Team
--------------------
Content-Class: urn:content-classes:message
From: "Ravi Shankar" <shankycheil@newsgroup.nospam>
Sender: "Ravi Shankar" <shankycheil@newsgroup.nospam>
References: <d3e23e59.0409121233.3230921@posting.google.com>
Subject: C# Pipeline Question
Date: Mon, 13 Sep 2004 02:35:21 -0700
Lines: 59
Message-ID: <119601c49974$fd345d60$a401280a@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Thread-Index: AcSZdP00SeqjOz7JT8qBhwkv5WXQCA==
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Newsgroups: microsoft.public.commerceserver.general
Path: cpmsftngxa10.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.general:14745
NNTP-Posting-Host: tk2msftngxa12.phx.gbl 10.40.1.164
X-Tomcat-NG: microsoft.public.commerceserver.general
There is a HOWTO: Article which should provide you with
the startup template and the best bet for the rest of the
questions is the "Commerce Server 2002" Documentation

>-----Original Message-----
>Hi,
>Does anyone have any idea how to code Pipeline
components in c#. I
>have the following template from MS, but what do you do
with it. Where
>do you put code? Where is the OrderForm object sent in
and how do you
>do modifications on it.
>Thanks.
>
>
>http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/csvr2002/htm/cs_pp_buildingpipecomps_gazs.asp
>using System;
>using System.Runtime.InteropServices;
>using Microsoft.CommerceServer.Runtime;
>using Microsoft.CommerceServer.Interop;
>using Microsoft.CommerceServer.Interop.Orders;
>
>namespace Commerce
>
>{
> [GuidAttribute("7BB430D4-5DD0-4ed9-B453-A93AB813E540")]
>
> public class CSharpTemplate : IPipelineComponentAdmin,
> IPipelineComponent,
>
IPipelineComponentDescription,
> IPersistDictionary
> {
> public CSharpTemplate(){this.InitNew();}
> public String GetProgID(){return null; }
> public void InitNew(){}
> public Int32 IsDirty(){return 0; }
> public void Load(Object pDispDict){}
> public void Save(Object pDispDict, Int32 fSameAsLoad)
{}
> public Int32 Execute(Object pdispOrder, Object
pdispContext, Int32
>Flags){return 0;}
> public void EnableDesign(Int32 fEnable){}
> public Object GetConfigData(){return null;}
> public void SetConfigData(Object pdispDict){}
> public System.Object ContextValuesRead(){return
null;}
> public System.Object ValuesRead(){return null;}
> public System.Object ValuesWritten(){return null;}
> }
>}
>.
>
| |
| jw56578@gmail.com 2004-09-22, 9:47 pm |
| Thanks for your good answer to my question. could I ask you something
else:
What does the Object pdispContext do , is there any more detailed
documentation on C# pipeline development, such as a complete example
of a functioning pipeline compoenent
andrepod@online.microsoft.com (Andre Podnozov [MSFT]) wrote in message news:<$Ub3vnBnEHA.2444@cpmsftngxa06.phx.gbl>...
> The main logic of your pipeline component resides in the Execute() method.
> Unfortunately you will not get the OrderForm object in C# sense, you will
> get passed an Order Dictionary (pdispOrder argument). This dictionary is
> like a key/value pair list. You can cast this object to
> Microsoft.CommerceServer.Runtime.IDictionary interface which is defined in
> MSCSCoreLib.dll, then just access the elements through the indexer:
>
> IDictionary dict = (IDictionary)pdispOrder;
> dict["foo"] = "bar";
>
> Thanks,
> Andre
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
> EBusiness Server Team
> --------------------
> Content-Class: urn:content-classes:message
> From: "Ravi Shankar" <shankycheil@newsgroup.nospam>
> Sender: "Ravi Shankar" <shankycheil@newsgroup.nospam>
> References: <d3e23e59.0409121233.3230921@posting.google.com>
> Subject: C# Pipeline Question
> Date: Mon, 13 Sep 2004 02:35:21 -0700
> Lines: 59
> Message-ID: <119601c49974$fd345d60$a401280a@phx.gbl>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: 7bit
> X-Newsreader: Microsoft CDO for Windows 2000
> Thread-Index: AcSZdP00SeqjOz7JT8qBhwkv5WXQCA==
> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
> Newsgroups: microsoft.public.commerceserver.general
> Path: cpmsftngxa10.phx.gbl
> Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.general:14745
> NNTP-Posting-Host: tk2msftngxa12.phx.gbl 10.40.1.164
> X-Tomcat-NG: microsoft.public.commerceserver.general
>
> There is a HOWTO: Article which should provide you with
> the startup template and the best bet for the rest of the
> questions is the "Commerce Server 2002" Documentation
>
> 
>
> components in c#. I
> with it. Where
> and how do you
> url=/library/en-
> us/csvr2002/htm/cs_pp_buildingpipecomps_gazs.asp
> IPipelineComponentDescription,
> {}
> pdispContext, Int32
> null;}
>
> --
| |
| Andre Podnozov [MSFT] 2004-09-22, 9:47 pm |
| While Order dictionary has data related to a particular order, Context
dictionary usially contains some config data or other data that is not tied
to the order itself but still needed for the pipeline to run (for example,
). Each pipeline component must document which values it reads from Context
dictionary, and reads/writes to Order dictionary (as a general rule,
pipeline components shouldn't write to Context dictionary). You can browse
this list of CS2002 components to get a better feel of what kind of stuff
is usually read and written:
http://msdn.microsoft.com/library/d...-us/csvr2002/ht
m/cs_rp_intropipecomp_zfpr.asp
Then, the site code that runs this pipeline will need to provide the
dictionary keys that each component requires (also some keys may be
optional), as this maple shows:
http://msdn.microsoft.com/library/e...pelineobj_jopd.
asp
Unfortunately i dont have a pointer to a C# pipeline implementation sample.
Thanks
Andre
This posting is provided "AS IS" with no warranties, and confers no rights.
EBusiness Server Team
--------------------
From: jw56578@gmail.com
Newsgroups: microsoft.public.commerceserver.general
Subject: Re: C# Pipeline Question
Date: 17 Sep 2004 14:58:25 -0700
Thanks for your good answer to my question. could I ask you something
else:
What does the Object pdispContext do , is there any more detailed
documentation on C# pipeline development, such as a complete example
of a functioning pipeline compoenent
andrepod@online.microsoft.com (Andre Podnozov [MSFT]) wrote in message
news:<$Ub3vnBnEHA.2444@cpmsftngxa06.phx.gbl>...
> The main logic of your pipeline component resides in the Execute()
method.
> Unfortunately you will not get the OrderForm object in C# sense, you will
> get passed an Order Dictionary (pdispOrder argument). This dictionary is
> like a key/value pair list. You can cast this object to
> Microsoft.CommerceServer.Runtime.IDictionary interface which is defined
in
> MSCSCoreLib.dll, then just access the elements through the indexer:
>
> IDictionary dict = (IDictionary)pdispOrder;
> dict["foo"] = "bar";
>
> Thanks,
> Andre
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> EBusiness Server Team
> --------------------
> Content-Class: urn:content-classes:message
> From: "Ravi Shankar" <shankycheil@newsgroup.nospam>
> Sender: "Ravi Shankar" <shankycheil@newsgroup.nospam>
> References: <d3e23e59.0409121233.3230921@posting.google.com>
> Subject: C# Pipeline Question
> Date: Mon, 13 Sep 2004 02:35:21 -0700
> Lines: 59
> Message-ID: <119601c49974$fd345d60$a401280a@phx.gbl>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: 7bit
> X-Newsreader: Microsoft CDO for Windows 2000
> Thread-Index: AcSZdP00SeqjOz7JT8qBhwkv5WXQCA==
> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
> Newsgroups: microsoft.public.commerceserver.general
> Path: cpmsftngxa10.phx.gbl
> Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.general:14745
> NNTP-Posting-Host: tk2msftngxa12.phx.gbl 10.40.1.164
> X-Tomcat-NG: microsoft.public.commerceserver.general
>
> There is a HOWTO: Article which should provide you with
> the startup template and the best bet for the rest of the
> questions is the "Commerce Server 2002" Documentation
>
> 
>
> components in c#. I
> with it. Where
> and how do you
> url=/library/en-
> us/csvr2002/htm/cs_pp_buildingpipecomps_gazs.asp
> IPipelineComponentDescription,
> {}
> pdispContext, Int32
> null;}
>
> --
|
|
|
|
|