المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : info on Evidence class



C# Programming
09-10-2009, 10:03 AM
Hi all
I am trying to understand the Evidence class, but I am missing some point.
If I use the AddAssembly() method below in the main of my program,
am I supposed to expect to have my program signed with that strong name?

What's main use case for Evidence class?
Thanks
Mn


string sPubKeyBlob = "00240000048000009400000006020000" +
"00240000525341310004000001000100" +
"19390E945A40FB5730204A25FA5DC4DA" +
"B18688B412CB0EDB87A6EFC50E2796C9" +
"B41AD3040A7E46E4A02516C598678636" +
"44A0F74C39B7AB9C38C01F10AF4A5752" +
"BFBCDF7E6DD826676AD031E7BCE63393" +
"495BAD2CA4BE03B529A73C95E5B06BE7" +
"35CA0F622C63E8F54171BD73E4C8F193" +
"CB2664163719CA41F8159B8AC88F8CD3";
Byte[] pubkey = HexsToArray(sPubKeyBlob);

StrongName sn = new StrongName(
new System.Security.Permissions.StrongNamePublicKeyBlob(pubkey),
"Manu",new Version(2,1,1,0));

object[] z = new object[]{
new Zone(SecurityZone.Internet), sn };
Evidence ev = new Evidence();
ev.AddAssembly(z);