PropertyBag elements keep getting wiped out
i having issue propertybag of custom pipeline getting wiped out. have attached component , stepped through testing.
it calls load method first , loads properties fine steps load method second time , wipes values.
any idea on going on?
hi ,
try below code...
private string _holdfolder; public string holdfolder { get { return _holdfolder; } set { _holdfolder = value; } } private string _testfolder; public string testfolder { get { return _testfolder; } set { _testfolder = value; } } public void getclassid(out guid classid) { classid = new guid("655b591f-8994-4e52-8ecd-2d7e8e78b25c"); } public void initnew() { } public void load(ipropertybag propertybag, int errorlog) { object val = null; try { propertybag.read("holdfolder", out val, 0); } catch (exception ex) { throw new applicationexception("error reading propertybag: " + ex.message); } if (val != null) _holdfolder = (string)val; else _holdfolder = "";; object val2 = null; try { propertybag.read("testfolder", out val2, 0); } catch (argumentexception argex) { // code } catch (exception ex) { throw new applicationexception("error reading propertybag: " + ex.message); } if (val2 != null) _testfolder = (string)val2; else _testfolder = ""; } public void save(ipropertybag propertybag, bool cleardirty, bool saveallproperties) { object val = (object)_holdfolder; propertybag.write("holdfolder", ref val); object val2 = (object)_testfolder; propertybag.write("testfolder", ref val2); }
don't forget mark post answer or vote helpful if does, regards - rajasekhar.r
BizTalk Server > BizTalk Server General
Comments
Post a Comment