C# Pipeline Question
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Commerce Server > Commerce Server General > C# Pipeline Question




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    C# Pipeline Question  
Ravi Shankar


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-13-04 12:47 PM

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;}
>  }
>}
>.
>





[ Post a follow-up to this message ]



    RE: C# Pipeline Question  
Andre Podnozov [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-04 02:47 AM

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;}
>  }
>}
>.
>






[ Post a follow-up to this message ]



    Re: C# Pipeline Question  
jw56578@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-04 02:47 AM

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;} 
>
> --





[ Post a follow-up to this message ]



    Re: C# Pipeline Question  
Andre Podnozov [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-23-04 02:47 AM

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;} 
>
> --






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 10:02 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register