暫無描述

initupload.designer.cs 155KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683
  1. // ------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // Generated by Xsd2Code. Version 3.4.0.32989
  4. // <NameSpace>JPK_v1</NameSpace><Collection>List</Collection><codeType>CSharp</codeType><EnableDataBinding>False</EnableDataBinding><EnableLazyLoading>False</EnableLazyLoading><TrackingChangesEnable>False</TrackingChangesEnable><GenTrackingClasses>False</GenTrackingClasses><HidePrivateFieldInIDE>False</HidePrivateFieldInIDE><EnableSummaryComment>False</EnableSummaryComment><VirtualProp>False</VirtualProp><IncludeSerializeMethod>True</IncludeSerializeMethod><UseBaseClass>False</UseBaseClass><GenBaseClass>False</GenBaseClass><GenerateCloneMethod>False</GenerateCloneMethod><GenerateDataContracts>False</GenerateDataContracts><CodeBaseTag>Net35</CodeBaseTag><SerializeMethodName>Serialize</SerializeMethodName><DeserializeMethodName>Deserialize</DeserializeMethodName><SaveToFileMethodName>SaveToFile</SaveToFileMethodName><LoadFromFileMethodName>LoadFromFile</LoadFromFileMethodName><GenerateXMLAttributes>True</GenerateXMLAttributes><OrderXMLAttrib>True</OrderXMLAttrib><EnableEncoding>False</EnableEncoding><AutomaticProperties>False</AutomaticProperties><GenerateShouldSerialize>False</GenerateShouldSerialize><DisableDebug>False</DisableDebug><PropNameSpecified>Default</PropNameSpecified><Encoder>UTF8</Encoder><CustomUsings></CustomUsings><ExcludeIncludedTypes>False</ExcludeIncludedTypes><EnableInitializeFields>True</EnableInitializeFields>
  5. // </auto-generated>
  6. // ------------------------------------------------------------------------------
  7. namespace JPK_v1
  8. {
  9. using System;
  10. using System.Diagnostics;
  11. using System.Xml.Serialization;
  12. using System.Collections;
  13. using System.Xml.Schema;
  14. using System.ComponentModel;
  15. using System.IO;
  16. using System.Text;
  17. using System.Collections.Generic;
  18. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
  19. [System.SerializableAttribute()]
  20. [System.ComponentModel.DesignerCategoryAttribute("code")]
  21. [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://e-dokumenty.mf.gov.pl")]
  22. [System.Xml.Serialization.XmlRootAttribute("InitUpload", Namespace = "http://e-dokumenty.mf.gov.pl", IsNullable = false)]
  23. public partial class InitUploadType
  24. {
  25. private InitUploadTypeDocumentType documentTypeField;
  26. private string versionField;
  27. private InitUploadTypeEncryptionKey encryptionKeyField;
  28. private ArrayOfDocumentType documentListField;
  29. private static System.Xml.Serialization.XmlSerializer serializer;
  30. public InitUploadType()
  31. {
  32. this.documentListField = new ArrayOfDocumentType();
  33. this.encryptionKeyField = new InitUploadTypeEncryptionKey();
  34. this.versionField = "01.02.01.20160617";
  35. }
  36. [System.Xml.Serialization.XmlElementAttribute(Order = 0)]
  37. public InitUploadTypeDocumentType DocumentType
  38. {
  39. get
  40. {
  41. return this.documentTypeField;
  42. }
  43. set
  44. {
  45. this.documentTypeField = value;
  46. }
  47. }
  48. [System.Xml.Serialization.XmlElementAttribute(Order = 1)]
  49. public string Version
  50. {
  51. get
  52. {
  53. return this.versionField;
  54. }
  55. set
  56. {
  57. this.versionField = value;
  58. }
  59. }
  60. [System.Xml.Serialization.XmlElementAttribute(Order = 2)]
  61. public InitUploadTypeEncryptionKey EncryptionKey
  62. {
  63. get
  64. {
  65. return this.encryptionKeyField;
  66. }
  67. set
  68. {
  69. this.encryptionKeyField = value;
  70. }
  71. }
  72. [System.Xml.Serialization.XmlElementAttribute(Order = 3)]
  73. public ArrayOfDocumentType DocumentList
  74. {
  75. get
  76. {
  77. return this.documentListField;
  78. }
  79. set
  80. {
  81. this.documentListField = value;
  82. }
  83. }
  84. private static System.Xml.Serialization.XmlSerializer Serializer
  85. {
  86. get
  87. {
  88. if ((serializer == null))
  89. {
  90. serializer = new System.Xml.Serialization.XmlSerializer(typeof(InitUploadType));
  91. }
  92. return serializer;
  93. }
  94. }
  95. #region Serialize/Deserialize
  96. /// <summary>
  97. /// Serializes current InitUploadType object into an XML document
  98. /// </summary>
  99. /// <returns>string XML value</returns>
  100. public virtual string Serialize()
  101. {
  102. System.IO.StreamReader streamReader = null;
  103. System.IO.MemoryStream memoryStream = null;
  104. try
  105. {
  106. memoryStream = new System.IO.MemoryStream();
  107. Serializer.Serialize(memoryStream, this);
  108. memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
  109. streamReader = new System.IO.StreamReader(memoryStream);
  110. return streamReader.ReadToEnd();
  111. }
  112. finally
  113. {
  114. if ((streamReader != null))
  115. {
  116. streamReader.Dispose();
  117. }
  118. if ((memoryStream != null))
  119. {
  120. memoryStream.Dispose();
  121. }
  122. }
  123. }
  124. /// <summary>
  125. /// Deserializes workflow markup into an InitUploadType object
  126. /// </summary>
  127. /// <param name="xml">string workflow markup to deserialize</param>
  128. /// <param name="obj">Output InitUploadType object</param>
  129. /// <param name="exception">output Exception value if deserialize failed</param>
  130. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  131. public static bool Deserialize(string xml, out InitUploadType obj, out System.Exception exception)
  132. {
  133. exception = null;
  134. obj = default(InitUploadType);
  135. try
  136. {
  137. obj = Deserialize(xml);
  138. return true;
  139. }
  140. catch (System.Exception ex)
  141. {
  142. exception = ex;
  143. return false;
  144. }
  145. }
  146. public static bool Deserialize(string xml, out InitUploadType obj)
  147. {
  148. System.Exception exception = null;
  149. return Deserialize(xml, out obj, out exception);
  150. }
  151. public static InitUploadType Deserialize(string xml)
  152. {
  153. System.IO.StringReader stringReader = null;
  154. try
  155. {
  156. stringReader = new System.IO.StringReader(xml);
  157. return ((InitUploadType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
  158. }
  159. finally
  160. {
  161. if ((stringReader != null))
  162. {
  163. stringReader.Dispose();
  164. }
  165. }
  166. }
  167. /// <summary>
  168. /// Serializes current InitUploadType object into file
  169. /// </summary>
  170. /// <param name="fileName">full path of outupt xml file</param>
  171. /// <param name="exception">output Exception value if failed</param>
  172. /// <returns>true if can serialize and save into file; otherwise, false</returns>
  173. public virtual bool SaveToFile(string fileName, out System.Exception exception)
  174. {
  175. exception = null;
  176. try
  177. {
  178. SaveToFile(fileName);
  179. return true;
  180. }
  181. catch (System.Exception e)
  182. {
  183. exception = e;
  184. return false;
  185. }
  186. }
  187. public virtual void SaveToFile(string fileName)
  188. {
  189. System.IO.StreamWriter streamWriter = null;
  190. try
  191. {
  192. string xmlString = Serialize();
  193. System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
  194. streamWriter = xmlFile.CreateText();
  195. streamWriter.WriteLine(xmlString);
  196. streamWriter.Close();
  197. }
  198. finally
  199. {
  200. if ((streamWriter != null))
  201. {
  202. streamWriter.Dispose();
  203. }
  204. }
  205. }
  206. /// <summary>
  207. /// Deserializes xml markup from file into an InitUploadType object
  208. /// </summary>
  209. /// <param name="fileName">string xml file to load and deserialize</param>
  210. /// <param name="obj">Output InitUploadType object</param>
  211. /// <param name="exception">output Exception value if deserialize failed</param>
  212. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  213. public static bool LoadFromFile(string fileName, out InitUploadType obj, out System.Exception exception)
  214. {
  215. exception = null;
  216. obj = default(InitUploadType);
  217. try
  218. {
  219. obj = LoadFromFile(fileName);
  220. return true;
  221. }
  222. catch (System.Exception ex)
  223. {
  224. exception = ex;
  225. return false;
  226. }
  227. }
  228. public static bool LoadFromFile(string fileName, out InitUploadType obj)
  229. {
  230. System.Exception exception = null;
  231. return LoadFromFile(fileName, out obj, out exception);
  232. }
  233. public static InitUploadType LoadFromFile(string fileName)
  234. {
  235. System.IO.FileStream file = null;
  236. System.IO.StreamReader sr = null;
  237. try
  238. {
  239. file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
  240. sr = new System.IO.StreamReader(file);
  241. string xmlString = sr.ReadToEnd();
  242. sr.Close();
  243. file.Close();
  244. return Deserialize(xmlString);
  245. }
  246. finally
  247. {
  248. if ((file != null))
  249. {
  250. file.Dispose();
  251. }
  252. if ((sr != null))
  253. {
  254. sr.Dispose();
  255. }
  256. }
  257. }
  258. #endregion
  259. }
  260. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
  261. [System.SerializableAttribute()]
  262. [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://e-dokumenty.mf.gov.pl")]
  263. public enum InitUploadTypeDocumentType
  264. {
  265. /// <remarks/>
  266. JPK,
  267. /// <remarks/>
  268. JPKAH,
  269. }
  270. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
  271. [System.SerializableAttribute()]
  272. [System.ComponentModel.DesignerCategoryAttribute("code")]
  273. [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://e-dokumenty.mf.gov.pl")]
  274. public partial class InitUploadTypeEncryptionKey : EncryptionKeyRSAType
  275. {
  276. private static System.Xml.Serialization.XmlSerializer serializer;
  277. private static System.Xml.Serialization.XmlSerializer Serializer
  278. {
  279. get
  280. {
  281. if ((serializer == null))
  282. {
  283. serializer = new System.Xml.Serialization.XmlSerializer(typeof(InitUploadTypeEncryptionKey));
  284. }
  285. return serializer;
  286. }
  287. }
  288. #region Serialize/Deserialize
  289. /// <summary>
  290. /// Serializes current InitUploadTypeEncryptionKey object into an XML document
  291. /// </summary>
  292. /// <returns>string XML value</returns>
  293. public virtual string Serialize()
  294. {
  295. System.IO.StreamReader streamReader = null;
  296. System.IO.MemoryStream memoryStream = null;
  297. try
  298. {
  299. memoryStream = new System.IO.MemoryStream();
  300. Serializer.Serialize(memoryStream, this);
  301. memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
  302. streamReader = new System.IO.StreamReader(memoryStream);
  303. return streamReader.ReadToEnd();
  304. }
  305. finally
  306. {
  307. if ((streamReader != null))
  308. {
  309. streamReader.Dispose();
  310. }
  311. if ((memoryStream != null))
  312. {
  313. memoryStream.Dispose();
  314. }
  315. }
  316. }
  317. /// <summary>
  318. /// Deserializes workflow markup into an InitUploadTypeEncryptionKey object
  319. /// </summary>
  320. /// <param name="xml">string workflow markup to deserialize</param>
  321. /// <param name="obj">Output InitUploadTypeEncryptionKey object</param>
  322. /// <param name="exception">output Exception value if deserialize failed</param>
  323. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  324. public static bool Deserialize(string xml, out InitUploadTypeEncryptionKey obj, out System.Exception exception)
  325. {
  326. exception = null;
  327. obj = default(InitUploadTypeEncryptionKey);
  328. try
  329. {
  330. obj = Deserialize(xml);
  331. return true;
  332. }
  333. catch (System.Exception ex)
  334. {
  335. exception = ex;
  336. return false;
  337. }
  338. }
  339. public static bool Deserialize(string xml, out InitUploadTypeEncryptionKey obj)
  340. {
  341. System.Exception exception = null;
  342. return Deserialize(xml, out obj, out exception);
  343. }
  344. public static InitUploadTypeEncryptionKey Deserialize(string xml)
  345. {
  346. System.IO.StringReader stringReader = null;
  347. try
  348. {
  349. stringReader = new System.IO.StringReader(xml);
  350. return ((InitUploadTypeEncryptionKey)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
  351. }
  352. finally
  353. {
  354. if ((stringReader != null))
  355. {
  356. stringReader.Dispose();
  357. }
  358. }
  359. }
  360. /// <summary>
  361. /// Serializes current InitUploadTypeEncryptionKey object into file
  362. /// </summary>
  363. /// <param name="fileName">full path of outupt xml file</param>
  364. /// <param name="exception">output Exception value if failed</param>
  365. /// <returns>true if can serialize and save into file; otherwise, false</returns>
  366. public virtual bool SaveToFile(string fileName, out System.Exception exception)
  367. {
  368. exception = null;
  369. try
  370. {
  371. SaveToFile(fileName);
  372. return true;
  373. }
  374. catch (System.Exception e)
  375. {
  376. exception = e;
  377. return false;
  378. }
  379. }
  380. public virtual void SaveToFile(string fileName)
  381. {
  382. System.IO.StreamWriter streamWriter = null;
  383. try
  384. {
  385. string xmlString = Serialize();
  386. System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
  387. streamWriter = xmlFile.CreateText();
  388. streamWriter.WriteLine(xmlString);
  389. streamWriter.Close();
  390. }
  391. finally
  392. {
  393. if ((streamWriter != null))
  394. {
  395. streamWriter.Dispose();
  396. }
  397. }
  398. }
  399. /// <summary>
  400. /// Deserializes xml markup from file into an InitUploadTypeEncryptionKey object
  401. /// </summary>
  402. /// <param name="fileName">string xml file to load and deserialize</param>
  403. /// <param name="obj">Output InitUploadTypeEncryptionKey object</param>
  404. /// <param name="exception">output Exception value if deserialize failed</param>
  405. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  406. public static bool LoadFromFile(string fileName, out InitUploadTypeEncryptionKey obj, out System.Exception exception)
  407. {
  408. exception = null;
  409. obj = default(InitUploadTypeEncryptionKey);
  410. try
  411. {
  412. obj = LoadFromFile(fileName);
  413. return true;
  414. }
  415. catch (System.Exception ex)
  416. {
  417. exception = ex;
  418. return false;
  419. }
  420. }
  421. public static bool LoadFromFile(string fileName, out InitUploadTypeEncryptionKey obj)
  422. {
  423. System.Exception exception = null;
  424. return LoadFromFile(fileName, out obj, out exception);
  425. }
  426. public static InitUploadTypeEncryptionKey LoadFromFile(string fileName)
  427. {
  428. System.IO.FileStream file = null;
  429. System.IO.StreamReader sr = null;
  430. try
  431. {
  432. file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
  433. sr = new System.IO.StreamReader(file);
  434. string xmlString = sr.ReadToEnd();
  435. sr.Close();
  436. file.Close();
  437. return Deserialize(xmlString);
  438. }
  439. finally
  440. {
  441. if ((file != null))
  442. {
  443. file.Dispose();
  444. }
  445. if ((sr != null))
  446. {
  447. sr.Dispose();
  448. }
  449. }
  450. }
  451. #endregion
  452. }
  453. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
  454. [System.SerializableAttribute()]
  455. [System.ComponentModel.DesignerCategoryAttribute("code")]
  456. [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://e-dokumenty.mf.gov.pl")]
  457. [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://e-dokumenty.mf.gov.pl", IsNullable = true)]
  458. public partial class EncryptionKeyRSAType
  459. {
  460. private string algorithmField;
  461. private string modeField;
  462. private string paddingField;
  463. private string encodingField;
  464. private string valueField;
  465. private static System.Xml.Serialization.XmlSerializer serializer;
  466. public EncryptionKeyRSAType()
  467. {
  468. this.algorithmField = "RSA";
  469. this.modeField = "ECB";
  470. this.paddingField = "PKCS#1";
  471. this.encodingField = "Base64";
  472. }
  473. [System.Xml.Serialization.XmlAttributeAttribute()]
  474. public string algorithm
  475. {
  476. get
  477. {
  478. return this.algorithmField;
  479. }
  480. set
  481. {
  482. this.algorithmField = value;
  483. }
  484. }
  485. [System.Xml.Serialization.XmlAttributeAttribute()]
  486. public string mode
  487. {
  488. get
  489. {
  490. return this.modeField;
  491. }
  492. set
  493. {
  494. this.modeField = value;
  495. }
  496. }
  497. [System.Xml.Serialization.XmlAttributeAttribute()]
  498. public string padding
  499. {
  500. get
  501. {
  502. return this.paddingField;
  503. }
  504. set
  505. {
  506. this.paddingField = value;
  507. }
  508. }
  509. [System.Xml.Serialization.XmlAttributeAttribute()]
  510. public string encoding
  511. {
  512. get
  513. {
  514. return this.encodingField;
  515. }
  516. set
  517. {
  518. this.encodingField = value;
  519. }
  520. }
  521. [System.Xml.Serialization.XmlTextAttribute(DataType = "token")]
  522. public string Value
  523. {
  524. get
  525. {
  526. return this.valueField;
  527. }
  528. set
  529. {
  530. this.valueField = value;
  531. }
  532. }
  533. private static System.Xml.Serialization.XmlSerializer Serializer
  534. {
  535. get
  536. {
  537. if ((serializer == null))
  538. {
  539. serializer = new System.Xml.Serialization.XmlSerializer(typeof(EncryptionKeyRSAType));
  540. }
  541. return serializer;
  542. }
  543. }
  544. #region Serialize/Deserialize
  545. /// <summary>
  546. /// Serializes current EncryptionKeyRSAType object into an XML document
  547. /// </summary>
  548. /// <returns>string XML value</returns>
  549. public virtual string Serialize()
  550. {
  551. System.IO.StreamReader streamReader = null;
  552. System.IO.MemoryStream memoryStream = null;
  553. try
  554. {
  555. memoryStream = new System.IO.MemoryStream();
  556. Serializer.Serialize(memoryStream, this);
  557. memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
  558. streamReader = new System.IO.StreamReader(memoryStream);
  559. return streamReader.ReadToEnd();
  560. }
  561. finally
  562. {
  563. if ((streamReader != null))
  564. {
  565. streamReader.Dispose();
  566. }
  567. if ((memoryStream != null))
  568. {
  569. memoryStream.Dispose();
  570. }
  571. }
  572. }
  573. /// <summary>
  574. /// Deserializes workflow markup into an EncryptionKeyRSAType object
  575. /// </summary>
  576. /// <param name="xml">string workflow markup to deserialize</param>
  577. /// <param name="obj">Output EncryptionKeyRSAType object</param>
  578. /// <param name="exception">output Exception value if deserialize failed</param>
  579. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  580. public static bool Deserialize(string xml, out EncryptionKeyRSAType obj, out System.Exception exception)
  581. {
  582. exception = null;
  583. obj = default(EncryptionKeyRSAType);
  584. try
  585. {
  586. obj = Deserialize(xml);
  587. return true;
  588. }
  589. catch (System.Exception ex)
  590. {
  591. exception = ex;
  592. return false;
  593. }
  594. }
  595. public static bool Deserialize(string xml, out EncryptionKeyRSAType obj)
  596. {
  597. System.Exception exception = null;
  598. return Deserialize(xml, out obj, out exception);
  599. }
  600. public static EncryptionKeyRSAType Deserialize(string xml)
  601. {
  602. System.IO.StringReader stringReader = null;
  603. try
  604. {
  605. stringReader = new System.IO.StringReader(xml);
  606. return ((EncryptionKeyRSAType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
  607. }
  608. finally
  609. {
  610. if ((stringReader != null))
  611. {
  612. stringReader.Dispose();
  613. }
  614. }
  615. }
  616. /// <summary>
  617. /// Serializes current EncryptionKeyRSAType object into file
  618. /// </summary>
  619. /// <param name="fileName">full path of outupt xml file</param>
  620. /// <param name="exception">output Exception value if failed</param>
  621. /// <returns>true if can serialize and save into file; otherwise, false</returns>
  622. public virtual bool SaveToFile(string fileName, out System.Exception exception)
  623. {
  624. exception = null;
  625. try
  626. {
  627. SaveToFile(fileName);
  628. return true;
  629. }
  630. catch (System.Exception e)
  631. {
  632. exception = e;
  633. return false;
  634. }
  635. }
  636. public virtual void SaveToFile(string fileName)
  637. {
  638. System.IO.StreamWriter streamWriter = null;
  639. try
  640. {
  641. string xmlString = Serialize();
  642. System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
  643. streamWriter = xmlFile.CreateText();
  644. streamWriter.WriteLine(xmlString);
  645. streamWriter.Close();
  646. }
  647. finally
  648. {
  649. if ((streamWriter != null))
  650. {
  651. streamWriter.Dispose();
  652. }
  653. }
  654. }
  655. /// <summary>
  656. /// Deserializes xml markup from file into an EncryptionKeyRSAType object
  657. /// </summary>
  658. /// <param name="fileName">string xml file to load and deserialize</param>
  659. /// <param name="obj">Output EncryptionKeyRSAType object</param>
  660. /// <param name="exception">output Exception value if deserialize failed</param>
  661. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  662. public static bool LoadFromFile(string fileName, out EncryptionKeyRSAType obj, out System.Exception exception)
  663. {
  664. exception = null;
  665. obj = default(EncryptionKeyRSAType);
  666. try
  667. {
  668. obj = LoadFromFile(fileName);
  669. return true;
  670. }
  671. catch (System.Exception ex)
  672. {
  673. exception = ex;
  674. return false;
  675. }
  676. }
  677. public static bool LoadFromFile(string fileName, out EncryptionKeyRSAType obj)
  678. {
  679. System.Exception exception = null;
  680. return LoadFromFile(fileName, out obj, out exception);
  681. }
  682. public static EncryptionKeyRSAType LoadFromFile(string fileName)
  683. {
  684. System.IO.FileStream file = null;
  685. System.IO.StreamReader sr = null;
  686. try
  687. {
  688. file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
  689. sr = new System.IO.StreamReader(file);
  690. string xmlString = sr.ReadToEnd();
  691. sr.Close();
  692. file.Close();
  693. return Deserialize(xmlString);
  694. }
  695. finally
  696. {
  697. if ((file != null))
  698. {
  699. file.Dispose();
  700. }
  701. if ((sr != null))
  702. {
  703. sr.Dispose();
  704. }
  705. }
  706. }
  707. #endregion
  708. }
  709. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
  710. [System.SerializableAttribute()]
  711. [System.ComponentModel.DesignerCategoryAttribute("code")]
  712. [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://e-dokumenty.mf.gov.pl")]
  713. [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://e-dokumenty.mf.gov.pl", IsNullable = true)]
  714. public partial class HashValueMD5Type
  715. {
  716. private string algorithmField;
  717. private string encodingField;
  718. private string valueField;
  719. private static System.Xml.Serialization.XmlSerializer serializer;
  720. public HashValueMD5Type()
  721. {
  722. this.algorithmField = "MD5";
  723. this.encodingField = "Base64";
  724. }
  725. [System.Xml.Serialization.XmlAttributeAttribute()]
  726. public string algorithm
  727. {
  728. get
  729. {
  730. return this.algorithmField;
  731. }
  732. set
  733. {
  734. this.algorithmField = value;
  735. }
  736. }
  737. [System.Xml.Serialization.XmlAttributeAttribute()]
  738. public string encoding
  739. {
  740. get
  741. {
  742. return this.encodingField;
  743. }
  744. set
  745. {
  746. this.encodingField = value;
  747. }
  748. }
  749. [System.Xml.Serialization.XmlTextAttribute(DataType = "token")]
  750. public string Value
  751. {
  752. get
  753. {
  754. return this.valueField;
  755. }
  756. set
  757. {
  758. this.valueField = value;
  759. }
  760. }
  761. private static System.Xml.Serialization.XmlSerializer Serializer
  762. {
  763. get
  764. {
  765. if ((serializer == null))
  766. {
  767. serializer = new System.Xml.Serialization.XmlSerializer(typeof(HashValueMD5Type));
  768. }
  769. return serializer;
  770. }
  771. }
  772. #region Serialize/Deserialize
  773. /// <summary>
  774. /// Serializes current HashValueMD5Type object into an XML document
  775. /// </summary>
  776. /// <returns>string XML value</returns>
  777. public virtual string Serialize()
  778. {
  779. System.IO.StreamReader streamReader = null;
  780. System.IO.MemoryStream memoryStream = null;
  781. try
  782. {
  783. memoryStream = new System.IO.MemoryStream();
  784. Serializer.Serialize(memoryStream, this);
  785. memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
  786. streamReader = new System.IO.StreamReader(memoryStream);
  787. return streamReader.ReadToEnd();
  788. }
  789. finally
  790. {
  791. if ((streamReader != null))
  792. {
  793. streamReader.Dispose();
  794. }
  795. if ((memoryStream != null))
  796. {
  797. memoryStream.Dispose();
  798. }
  799. }
  800. }
  801. /// <summary>
  802. /// Deserializes workflow markup into an HashValueMD5Type object
  803. /// </summary>
  804. /// <param name="xml">string workflow markup to deserialize</param>
  805. /// <param name="obj">Output HashValueMD5Type object</param>
  806. /// <param name="exception">output Exception value if deserialize failed</param>
  807. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  808. public static bool Deserialize(string xml, out HashValueMD5Type obj, out System.Exception exception)
  809. {
  810. exception = null;
  811. obj = default(HashValueMD5Type);
  812. try
  813. {
  814. obj = Deserialize(xml);
  815. return true;
  816. }
  817. catch (System.Exception ex)
  818. {
  819. exception = ex;
  820. return false;
  821. }
  822. }
  823. public static bool Deserialize(string xml, out HashValueMD5Type obj)
  824. {
  825. System.Exception exception = null;
  826. return Deserialize(xml, out obj, out exception);
  827. }
  828. public static HashValueMD5Type Deserialize(string xml)
  829. {
  830. System.IO.StringReader stringReader = null;
  831. try
  832. {
  833. stringReader = new System.IO.StringReader(xml);
  834. return ((HashValueMD5Type)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
  835. }
  836. finally
  837. {
  838. if ((stringReader != null))
  839. {
  840. stringReader.Dispose();
  841. }
  842. }
  843. }
  844. /// <summary>
  845. /// Serializes current HashValueMD5Type object into file
  846. /// </summary>
  847. /// <param name="fileName">full path of outupt xml file</param>
  848. /// <param name="exception">output Exception value if failed</param>
  849. /// <returns>true if can serialize and save into file; otherwise, false</returns>
  850. public virtual bool SaveToFile(string fileName, out System.Exception exception)
  851. {
  852. exception = null;
  853. try
  854. {
  855. SaveToFile(fileName);
  856. return true;
  857. }
  858. catch (System.Exception e)
  859. {
  860. exception = e;
  861. return false;
  862. }
  863. }
  864. public virtual void SaveToFile(string fileName)
  865. {
  866. System.IO.StreamWriter streamWriter = null;
  867. try
  868. {
  869. string xmlString = Serialize();
  870. System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
  871. streamWriter = xmlFile.CreateText();
  872. streamWriter.WriteLine(xmlString);
  873. streamWriter.Close();
  874. }
  875. finally
  876. {
  877. if ((streamWriter != null))
  878. {
  879. streamWriter.Dispose();
  880. }
  881. }
  882. }
  883. /// <summary>
  884. /// Deserializes xml markup from file into an HashValueMD5Type object
  885. /// </summary>
  886. /// <param name="fileName">string xml file to load and deserialize</param>
  887. /// <param name="obj">Output HashValueMD5Type object</param>
  888. /// <param name="exception">output Exception value if deserialize failed</param>
  889. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  890. public static bool LoadFromFile(string fileName, out HashValueMD5Type obj, out System.Exception exception)
  891. {
  892. exception = null;
  893. obj = default(HashValueMD5Type);
  894. try
  895. {
  896. obj = LoadFromFile(fileName);
  897. return true;
  898. }
  899. catch (System.Exception ex)
  900. {
  901. exception = ex;
  902. return false;
  903. }
  904. }
  905. public static bool LoadFromFile(string fileName, out HashValueMD5Type obj)
  906. {
  907. System.Exception exception = null;
  908. return LoadFromFile(fileName, out obj, out exception);
  909. }
  910. public static HashValueMD5Type LoadFromFile(string fileName)
  911. {
  912. System.IO.FileStream file = null;
  913. System.IO.StreamReader sr = null;
  914. try
  915. {
  916. file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
  917. sr = new System.IO.StreamReader(file);
  918. string xmlString = sr.ReadToEnd();
  919. sr.Close();
  920. file.Close();
  921. return Deserialize(xmlString);
  922. }
  923. finally
  924. {
  925. if ((file != null))
  926. {
  927. file.Dispose();
  928. }
  929. if ((sr != null))
  930. {
  931. sr.Dispose();
  932. }
  933. }
  934. }
  935. #endregion
  936. }
  937. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
  938. [System.SerializableAttribute()]
  939. [System.ComponentModel.DesignerCategoryAttribute("code")]
  940. [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://e-dokumenty.mf.gov.pl")]
  941. [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://e-dokumenty.mf.gov.pl", IsNullable = true)]
  942. public partial class FileSignatureType
  943. {
  944. private int ordinalNumberField;
  945. private string fileNameField;
  946. private int contentLengthField;
  947. private FileSignatureTypeHashValue hashValueField;
  948. private static System.Xml.Serialization.XmlSerializer serializer;
  949. public FileSignatureType()
  950. {
  951. this.hashValueField = new FileSignatureTypeHashValue();
  952. }
  953. [System.Xml.Serialization.XmlElementAttribute(Order = 0)]
  954. public int OrdinalNumber
  955. {
  956. get
  957. {
  958. return this.ordinalNumberField;
  959. }
  960. set
  961. {
  962. this.ordinalNumberField = value;
  963. }
  964. }
  965. [System.Xml.Serialization.XmlElementAttribute(Order = 1)]
  966. public string FileName
  967. {
  968. get
  969. {
  970. return this.fileNameField;
  971. }
  972. set
  973. {
  974. this.fileNameField = value;
  975. }
  976. }
  977. [System.Xml.Serialization.XmlElementAttribute(Order = 2)]
  978. public int ContentLength
  979. {
  980. get
  981. {
  982. return this.contentLengthField;
  983. }
  984. set
  985. {
  986. this.contentLengthField = value;
  987. }
  988. }
  989. [System.Xml.Serialization.XmlElementAttribute(Order = 3)]
  990. public FileSignatureTypeHashValue HashValue
  991. {
  992. get
  993. {
  994. return this.hashValueField;
  995. }
  996. set
  997. {
  998. this.hashValueField = value;
  999. }
  1000. }
  1001. private static System.Xml.Serialization.XmlSerializer Serializer
  1002. {
  1003. get
  1004. {
  1005. if ((serializer == null))
  1006. {
  1007. serializer = new System.Xml.Serialization.XmlSerializer(typeof(FileSignatureType));
  1008. }
  1009. return serializer;
  1010. }
  1011. }
  1012. #region Serialize/Deserialize
  1013. /// <summary>
  1014. /// Serializes current FileSignatureType object into an XML document
  1015. /// </summary>
  1016. /// <returns>string XML value</returns>
  1017. public virtual string Serialize()
  1018. {
  1019. System.IO.StreamReader streamReader = null;
  1020. System.IO.MemoryStream memoryStream = null;
  1021. try
  1022. {
  1023. memoryStream = new System.IO.MemoryStream();
  1024. Serializer.Serialize(memoryStream, this);
  1025. memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
  1026. streamReader = new System.IO.StreamReader(memoryStream);
  1027. return streamReader.ReadToEnd();
  1028. }
  1029. finally
  1030. {
  1031. if ((streamReader != null))
  1032. {
  1033. streamReader.Dispose();
  1034. }
  1035. if ((memoryStream != null))
  1036. {
  1037. memoryStream.Dispose();
  1038. }
  1039. }
  1040. }
  1041. /// <summary>
  1042. /// Deserializes workflow markup into an FileSignatureType object
  1043. /// </summary>
  1044. /// <param name="xml">string workflow markup to deserialize</param>
  1045. /// <param name="obj">Output FileSignatureType object</param>
  1046. /// <param name="exception">output Exception value if deserialize failed</param>
  1047. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  1048. public static bool Deserialize(string xml, out FileSignatureType obj, out System.Exception exception)
  1049. {
  1050. exception = null;
  1051. obj = default(FileSignatureType);
  1052. try
  1053. {
  1054. obj = Deserialize(xml);
  1055. return true;
  1056. }
  1057. catch (System.Exception ex)
  1058. {
  1059. exception = ex;
  1060. return false;
  1061. }
  1062. }
  1063. public static bool Deserialize(string xml, out FileSignatureType obj)
  1064. {
  1065. System.Exception exception = null;
  1066. return Deserialize(xml, out obj, out exception);
  1067. }
  1068. public static FileSignatureType Deserialize(string xml)
  1069. {
  1070. System.IO.StringReader stringReader = null;
  1071. try
  1072. {
  1073. stringReader = new System.IO.StringReader(xml);
  1074. return ((FileSignatureType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
  1075. }
  1076. finally
  1077. {
  1078. if ((stringReader != null))
  1079. {
  1080. stringReader.Dispose();
  1081. }
  1082. }
  1083. }
  1084. /// <summary>
  1085. /// Serializes current FileSignatureType object into file
  1086. /// </summary>
  1087. /// <param name="fileName">full path of outupt xml file</param>
  1088. /// <param name="exception">output Exception value if failed</param>
  1089. /// <returns>true if can serialize and save into file; otherwise, false</returns>
  1090. public virtual bool SaveToFile(string fileName, out System.Exception exception)
  1091. {
  1092. exception = null;
  1093. try
  1094. {
  1095. SaveToFile(fileName);
  1096. return true;
  1097. }
  1098. catch (System.Exception e)
  1099. {
  1100. exception = e;
  1101. return false;
  1102. }
  1103. }
  1104. public virtual void SaveToFile(string fileName)
  1105. {
  1106. System.IO.StreamWriter streamWriter = null;
  1107. try
  1108. {
  1109. string xmlString = Serialize();
  1110. System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
  1111. streamWriter = xmlFile.CreateText();
  1112. streamWriter.WriteLine(xmlString);
  1113. streamWriter.Close();
  1114. }
  1115. finally
  1116. {
  1117. if ((streamWriter != null))
  1118. {
  1119. streamWriter.Dispose();
  1120. }
  1121. }
  1122. }
  1123. /// <summary>
  1124. /// Deserializes xml markup from file into an FileSignatureType object
  1125. /// </summary>
  1126. /// <param name="fileName">string xml file to load and deserialize</param>
  1127. /// <param name="obj">Output FileSignatureType object</param>
  1128. /// <param name="exception">output Exception value if deserialize failed</param>
  1129. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  1130. public static bool LoadFromFile(string fileName, out FileSignatureType obj, out System.Exception exception)
  1131. {
  1132. exception = null;
  1133. obj = default(FileSignatureType);
  1134. try
  1135. {
  1136. obj = LoadFromFile(fileName);
  1137. return true;
  1138. }
  1139. catch (System.Exception ex)
  1140. {
  1141. exception = ex;
  1142. return false;
  1143. }
  1144. }
  1145. public static bool LoadFromFile(string fileName, out FileSignatureType obj)
  1146. {
  1147. System.Exception exception = null;
  1148. return LoadFromFile(fileName, out obj, out exception);
  1149. }
  1150. public static FileSignatureType LoadFromFile(string fileName)
  1151. {
  1152. System.IO.FileStream file = null;
  1153. System.IO.StreamReader sr = null;
  1154. try
  1155. {
  1156. file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
  1157. sr = new System.IO.StreamReader(file);
  1158. string xmlString = sr.ReadToEnd();
  1159. sr.Close();
  1160. file.Close();
  1161. return Deserialize(xmlString);
  1162. }
  1163. finally
  1164. {
  1165. if ((file != null))
  1166. {
  1167. file.Dispose();
  1168. }
  1169. if ((sr != null))
  1170. {
  1171. sr.Dispose();
  1172. }
  1173. }
  1174. }
  1175. #endregion
  1176. }
  1177. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
  1178. [System.SerializableAttribute()]
  1179. [System.ComponentModel.DesignerCategoryAttribute("code")]
  1180. [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://e-dokumenty.mf.gov.pl")]
  1181. public partial class FileSignatureTypeHashValue : HashValueMD5Type
  1182. {
  1183. private static System.Xml.Serialization.XmlSerializer serializer;
  1184. private static System.Xml.Serialization.XmlSerializer Serializer
  1185. {
  1186. get
  1187. {
  1188. if ((serializer == null))
  1189. {
  1190. serializer = new System.Xml.Serialization.XmlSerializer(typeof(FileSignatureTypeHashValue));
  1191. }
  1192. return serializer;
  1193. }
  1194. }
  1195. #region Serialize/Deserialize
  1196. /// <summary>
  1197. /// Serializes current FileSignatureTypeHashValue object into an XML document
  1198. /// </summary>
  1199. /// <returns>string XML value</returns>
  1200. public virtual string Serialize()
  1201. {
  1202. System.IO.StreamReader streamReader = null;
  1203. System.IO.MemoryStream memoryStream = null;
  1204. try
  1205. {
  1206. memoryStream = new System.IO.MemoryStream();
  1207. Serializer.Serialize(memoryStream, this);
  1208. memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
  1209. streamReader = new System.IO.StreamReader(memoryStream);
  1210. return streamReader.ReadToEnd();
  1211. }
  1212. finally
  1213. {
  1214. if ((streamReader != null))
  1215. {
  1216. streamReader.Dispose();
  1217. }
  1218. if ((memoryStream != null))
  1219. {
  1220. memoryStream.Dispose();
  1221. }
  1222. }
  1223. }
  1224. /// <summary>
  1225. /// Deserializes workflow markup into an FileSignatureTypeHashValue object
  1226. /// </summary>
  1227. /// <param name="xml">string workflow markup to deserialize</param>
  1228. /// <param name="obj">Output FileSignatureTypeHashValue object</param>
  1229. /// <param name="exception">output Exception value if deserialize failed</param>
  1230. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  1231. public static bool Deserialize(string xml, out FileSignatureTypeHashValue obj, out System.Exception exception)
  1232. {
  1233. exception = null;
  1234. obj = default(FileSignatureTypeHashValue);
  1235. try
  1236. {
  1237. obj = Deserialize(xml);
  1238. return true;
  1239. }
  1240. catch (System.Exception ex)
  1241. {
  1242. exception = ex;
  1243. return false;
  1244. }
  1245. }
  1246. public static bool Deserialize(string xml, out FileSignatureTypeHashValue obj)
  1247. {
  1248. System.Exception exception = null;
  1249. return Deserialize(xml, out obj, out exception);
  1250. }
  1251. public static FileSignatureTypeHashValue Deserialize(string xml)
  1252. {
  1253. System.IO.StringReader stringReader = null;
  1254. try
  1255. {
  1256. stringReader = new System.IO.StringReader(xml);
  1257. return ((FileSignatureTypeHashValue)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
  1258. }
  1259. finally
  1260. {
  1261. if ((stringReader != null))
  1262. {
  1263. stringReader.Dispose();
  1264. }
  1265. }
  1266. }
  1267. /// <summary>
  1268. /// Serializes current FileSignatureTypeHashValue object into file
  1269. /// </summary>
  1270. /// <param name="fileName">full path of outupt xml file</param>
  1271. /// <param name="exception">output Exception value if failed</param>
  1272. /// <returns>true if can serialize and save into file; otherwise, false</returns>
  1273. public virtual bool SaveToFile(string fileName, out System.Exception exception)
  1274. {
  1275. exception = null;
  1276. try
  1277. {
  1278. SaveToFile(fileName);
  1279. return true;
  1280. }
  1281. catch (System.Exception e)
  1282. {
  1283. exception = e;
  1284. return false;
  1285. }
  1286. }
  1287. public virtual void SaveToFile(string fileName)
  1288. {
  1289. System.IO.StreamWriter streamWriter = null;
  1290. try
  1291. {
  1292. string xmlString = Serialize();
  1293. System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
  1294. streamWriter = xmlFile.CreateText();
  1295. streamWriter.WriteLine(xmlString);
  1296. streamWriter.Close();
  1297. }
  1298. finally
  1299. {
  1300. if ((streamWriter != null))
  1301. {
  1302. streamWriter.Dispose();
  1303. }
  1304. }
  1305. }
  1306. /// <summary>
  1307. /// Deserializes xml markup from file into an FileSignatureTypeHashValue object
  1308. /// </summary>
  1309. /// <param name="fileName">string xml file to load and deserialize</param>
  1310. /// <param name="obj">Output FileSignatureTypeHashValue object</param>
  1311. /// <param name="exception">output Exception value if deserialize failed</param>
  1312. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  1313. public static bool LoadFromFile(string fileName, out FileSignatureTypeHashValue obj, out System.Exception exception)
  1314. {
  1315. exception = null;
  1316. obj = default(FileSignatureTypeHashValue);
  1317. try
  1318. {
  1319. obj = LoadFromFile(fileName);
  1320. return true;
  1321. }
  1322. catch (System.Exception ex)
  1323. {
  1324. exception = ex;
  1325. return false;
  1326. }
  1327. }
  1328. public static bool LoadFromFile(string fileName, out FileSignatureTypeHashValue obj)
  1329. {
  1330. System.Exception exception = null;
  1331. return LoadFromFile(fileName, out obj, out exception);
  1332. }
  1333. public static FileSignatureTypeHashValue LoadFromFile(string fileName)
  1334. {
  1335. System.IO.FileStream file = null;
  1336. System.IO.StreamReader sr = null;
  1337. try
  1338. {
  1339. file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
  1340. sr = new System.IO.StreamReader(file);
  1341. string xmlString = sr.ReadToEnd();
  1342. sr.Close();
  1343. file.Close();
  1344. return Deserialize(xmlString);
  1345. }
  1346. finally
  1347. {
  1348. if ((file != null))
  1349. {
  1350. file.Dispose();
  1351. }
  1352. if ((sr != null))
  1353. {
  1354. sr.Dispose();
  1355. }
  1356. }
  1357. }
  1358. #endregion
  1359. }
  1360. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
  1361. [System.SerializableAttribute()]
  1362. [System.ComponentModel.DesignerCategoryAttribute("code")]
  1363. [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://e-dokumenty.mf.gov.pl")]
  1364. [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://e-dokumenty.mf.gov.pl", IsNullable = true)]
  1365. public partial class EncryptionAESIVType
  1366. {
  1367. private string bytesField;
  1368. private string encodingField;
  1369. private string valueField;
  1370. private static System.Xml.Serialization.XmlSerializer serializer;
  1371. public EncryptionAESIVType()
  1372. {
  1373. this.bytesField = "16";
  1374. this.encodingField = "Base64";
  1375. }
  1376. [System.Xml.Serialization.XmlAttributeAttribute()]
  1377. public string bytes
  1378. {
  1379. get
  1380. {
  1381. return this.bytesField;
  1382. }
  1383. set
  1384. {
  1385. this.bytesField = value;
  1386. }
  1387. }
  1388. [System.Xml.Serialization.XmlAttributeAttribute()]
  1389. public string encoding
  1390. {
  1391. get
  1392. {
  1393. return this.encodingField;
  1394. }
  1395. set
  1396. {
  1397. this.encodingField = value;
  1398. }
  1399. }
  1400. [System.Xml.Serialization.XmlTextAttribute(DataType = "token")]
  1401. public string Value
  1402. {
  1403. get
  1404. {
  1405. return this.valueField;
  1406. }
  1407. set
  1408. {
  1409. this.valueField = value;
  1410. }
  1411. }
  1412. private static System.Xml.Serialization.XmlSerializer Serializer
  1413. {
  1414. get
  1415. {
  1416. if ((serializer == null))
  1417. {
  1418. serializer = new System.Xml.Serialization.XmlSerializer(typeof(EncryptionAESIVType));
  1419. }
  1420. return serializer;
  1421. }
  1422. }
  1423. #region Serialize/Deserialize
  1424. /// <summary>
  1425. /// Serializes current EncryptionAESIVType object into an XML document
  1426. /// </summary>
  1427. /// <returns>string XML value</returns>
  1428. public virtual string Serialize()
  1429. {
  1430. System.IO.StreamReader streamReader = null;
  1431. System.IO.MemoryStream memoryStream = null;
  1432. try
  1433. {
  1434. memoryStream = new System.IO.MemoryStream();
  1435. Serializer.Serialize(memoryStream, this);
  1436. memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
  1437. streamReader = new System.IO.StreamReader(memoryStream);
  1438. return streamReader.ReadToEnd();
  1439. }
  1440. finally
  1441. {
  1442. if ((streamReader != null))
  1443. {
  1444. streamReader.Dispose();
  1445. }
  1446. if ((memoryStream != null))
  1447. {
  1448. memoryStream.Dispose();
  1449. }
  1450. }
  1451. }
  1452. /// <summary>
  1453. /// Deserializes workflow markup into an EncryptionAESIVType object
  1454. /// </summary>
  1455. /// <param name="xml">string workflow markup to deserialize</param>
  1456. /// <param name="obj">Output EncryptionAESIVType object</param>
  1457. /// <param name="exception">output Exception value if deserialize failed</param>
  1458. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  1459. public static bool Deserialize(string xml, out EncryptionAESIVType obj, out System.Exception exception)
  1460. {
  1461. exception = null;
  1462. obj = default(EncryptionAESIVType);
  1463. try
  1464. {
  1465. obj = Deserialize(xml);
  1466. return true;
  1467. }
  1468. catch (System.Exception ex)
  1469. {
  1470. exception = ex;
  1471. return false;
  1472. }
  1473. }
  1474. public static bool Deserialize(string xml, out EncryptionAESIVType obj)
  1475. {
  1476. System.Exception exception = null;
  1477. return Deserialize(xml, out obj, out exception);
  1478. }
  1479. public static EncryptionAESIVType Deserialize(string xml)
  1480. {
  1481. System.IO.StringReader stringReader = null;
  1482. try
  1483. {
  1484. stringReader = new System.IO.StringReader(xml);
  1485. return ((EncryptionAESIVType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
  1486. }
  1487. finally
  1488. {
  1489. if ((stringReader != null))
  1490. {
  1491. stringReader.Dispose();
  1492. }
  1493. }
  1494. }
  1495. /// <summary>
  1496. /// Serializes current EncryptionAESIVType object into file
  1497. /// </summary>
  1498. /// <param name="fileName">full path of outupt xml file</param>
  1499. /// <param name="exception">output Exception value if failed</param>
  1500. /// <returns>true if can serialize and save into file; otherwise, false</returns>
  1501. public virtual bool SaveToFile(string fileName, out System.Exception exception)
  1502. {
  1503. exception = null;
  1504. try
  1505. {
  1506. SaveToFile(fileName);
  1507. return true;
  1508. }
  1509. catch (System.Exception e)
  1510. {
  1511. exception = e;
  1512. return false;
  1513. }
  1514. }
  1515. public virtual void SaveToFile(string fileName)
  1516. {
  1517. System.IO.StreamWriter streamWriter = null;
  1518. try
  1519. {
  1520. string xmlString = Serialize();
  1521. System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
  1522. streamWriter = xmlFile.CreateText();
  1523. streamWriter.WriteLine(xmlString);
  1524. streamWriter.Close();
  1525. }
  1526. finally
  1527. {
  1528. if ((streamWriter != null))
  1529. {
  1530. streamWriter.Dispose();
  1531. }
  1532. }
  1533. }
  1534. /// <summary>
  1535. /// Deserializes xml markup from file into an EncryptionAESIVType object
  1536. /// </summary>
  1537. /// <param name="fileName">string xml file to load and deserialize</param>
  1538. /// <param name="obj">Output EncryptionAESIVType object</param>
  1539. /// <param name="exception">output Exception value if deserialize failed</param>
  1540. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  1541. public static bool LoadFromFile(string fileName, out EncryptionAESIVType obj, out System.Exception exception)
  1542. {
  1543. exception = null;
  1544. obj = default(EncryptionAESIVType);
  1545. try
  1546. {
  1547. obj = LoadFromFile(fileName);
  1548. return true;
  1549. }
  1550. catch (System.Exception ex)
  1551. {
  1552. exception = ex;
  1553. return false;
  1554. }
  1555. }
  1556. public static bool LoadFromFile(string fileName, out EncryptionAESIVType obj)
  1557. {
  1558. System.Exception exception = null;
  1559. return LoadFromFile(fileName, out obj, out exception);
  1560. }
  1561. public static EncryptionAESIVType LoadFromFile(string fileName)
  1562. {
  1563. System.IO.FileStream file = null;
  1564. System.IO.StreamReader sr = null;
  1565. try
  1566. {
  1567. file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
  1568. sr = new System.IO.StreamReader(file);
  1569. string xmlString = sr.ReadToEnd();
  1570. sr.Close();
  1571. file.Close();
  1572. return Deserialize(xmlString);
  1573. }
  1574. finally
  1575. {
  1576. if ((file != null))
  1577. {
  1578. file.Dispose();
  1579. }
  1580. if ((sr != null))
  1581. {
  1582. sr.Dispose();
  1583. }
  1584. }
  1585. }
  1586. #endregion
  1587. }
  1588. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
  1589. [System.SerializableAttribute()]
  1590. [System.ComponentModel.DesignerCategoryAttribute("code")]
  1591. [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://e-dokumenty.mf.gov.pl")]
  1592. [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://e-dokumenty.mf.gov.pl", IsNullable = true)]
  1593. public partial class ArrayOfFileSignatureType
  1594. {
  1595. private ArrayOfFileSignatureTypePackaging packagingField;
  1596. private ArrayOfFileSignatureTypeEncryption encryptionField;
  1597. private List<FileSignatureType> fileSignatureField;
  1598. private static System.Xml.Serialization.XmlSerializer serializer;
  1599. public ArrayOfFileSignatureType()
  1600. {
  1601. this.fileSignatureField = new List<FileSignatureType>();
  1602. this.encryptionField = new ArrayOfFileSignatureTypeEncryption();
  1603. this.packagingField = new ArrayOfFileSignatureTypePackaging();
  1604. }
  1605. [System.Xml.Serialization.XmlElementAttribute(Order = 0)]
  1606. public ArrayOfFileSignatureTypePackaging Packaging
  1607. {
  1608. get
  1609. {
  1610. return this.packagingField;
  1611. }
  1612. set
  1613. {
  1614. this.packagingField = value;
  1615. }
  1616. }
  1617. [System.Xml.Serialization.XmlElementAttribute(Order = 1)]
  1618. public ArrayOfFileSignatureTypeEncryption Encryption
  1619. {
  1620. get
  1621. {
  1622. return this.encryptionField;
  1623. }
  1624. set
  1625. {
  1626. this.encryptionField = value;
  1627. }
  1628. }
  1629. [System.Xml.Serialization.XmlElementAttribute("FileSignature", Order = 2)]
  1630. public List<FileSignatureType> FileSignature
  1631. {
  1632. get
  1633. {
  1634. return this.fileSignatureField;
  1635. }
  1636. set
  1637. {
  1638. this.fileSignatureField = value;
  1639. }
  1640. }
  1641. private static System.Xml.Serialization.XmlSerializer Serializer
  1642. {
  1643. get
  1644. {
  1645. if ((serializer == null))
  1646. {
  1647. serializer = new System.Xml.Serialization.XmlSerializer(typeof(ArrayOfFileSignatureType));
  1648. }
  1649. return serializer;
  1650. }
  1651. }
  1652. #region Serialize/Deserialize
  1653. /// <summary>
  1654. /// Serializes current ArrayOfFileSignatureType object into an XML document
  1655. /// </summary>
  1656. /// <returns>string XML value</returns>
  1657. public virtual string Serialize()
  1658. {
  1659. System.IO.StreamReader streamReader = null;
  1660. System.IO.MemoryStream memoryStream = null;
  1661. try
  1662. {
  1663. memoryStream = new System.IO.MemoryStream();
  1664. Serializer.Serialize(memoryStream, this);
  1665. memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
  1666. streamReader = new System.IO.StreamReader(memoryStream);
  1667. return streamReader.ReadToEnd();
  1668. }
  1669. finally
  1670. {
  1671. if ((streamReader != null))
  1672. {
  1673. streamReader.Dispose();
  1674. }
  1675. if ((memoryStream != null))
  1676. {
  1677. memoryStream.Dispose();
  1678. }
  1679. }
  1680. }
  1681. /// <summary>
  1682. /// Deserializes workflow markup into an ArrayOfFileSignatureType object
  1683. /// </summary>
  1684. /// <param name="xml">string workflow markup to deserialize</param>
  1685. /// <param name="obj">Output ArrayOfFileSignatureType object</param>
  1686. /// <param name="exception">output Exception value if deserialize failed</param>
  1687. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  1688. public static bool Deserialize(string xml, out ArrayOfFileSignatureType obj, out System.Exception exception)
  1689. {
  1690. exception = null;
  1691. obj = default(ArrayOfFileSignatureType);
  1692. try
  1693. {
  1694. obj = Deserialize(xml);
  1695. return true;
  1696. }
  1697. catch (System.Exception ex)
  1698. {
  1699. exception = ex;
  1700. return false;
  1701. }
  1702. }
  1703. public static bool Deserialize(string xml, out ArrayOfFileSignatureType obj)
  1704. {
  1705. System.Exception exception = null;
  1706. return Deserialize(xml, out obj, out exception);
  1707. }
  1708. public static ArrayOfFileSignatureType Deserialize(string xml)
  1709. {
  1710. System.IO.StringReader stringReader = null;
  1711. try
  1712. {
  1713. stringReader = new System.IO.StringReader(xml);
  1714. return ((ArrayOfFileSignatureType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
  1715. }
  1716. finally
  1717. {
  1718. if ((stringReader != null))
  1719. {
  1720. stringReader.Dispose();
  1721. }
  1722. }
  1723. }
  1724. /// <summary>
  1725. /// Serializes current ArrayOfFileSignatureType object into file
  1726. /// </summary>
  1727. /// <param name="fileName">full path of outupt xml file</param>
  1728. /// <param name="exception">output Exception value if failed</param>
  1729. /// <returns>true if can serialize and save into file; otherwise, false</returns>
  1730. public virtual bool SaveToFile(string fileName, out System.Exception exception)
  1731. {
  1732. exception = null;
  1733. try
  1734. {
  1735. SaveToFile(fileName);
  1736. return true;
  1737. }
  1738. catch (System.Exception e)
  1739. {
  1740. exception = e;
  1741. return false;
  1742. }
  1743. }
  1744. public virtual void SaveToFile(string fileName)
  1745. {
  1746. System.IO.StreamWriter streamWriter = null;
  1747. try
  1748. {
  1749. string xmlString = Serialize();
  1750. System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
  1751. streamWriter = xmlFile.CreateText();
  1752. streamWriter.WriteLine(xmlString);
  1753. streamWriter.Close();
  1754. }
  1755. finally
  1756. {
  1757. if ((streamWriter != null))
  1758. {
  1759. streamWriter.Dispose();
  1760. }
  1761. }
  1762. }
  1763. /// <summary>
  1764. /// Deserializes xml markup from file into an ArrayOfFileSignatureType object
  1765. /// </summary>
  1766. /// <param name="fileName">string xml file to load and deserialize</param>
  1767. /// <param name="obj">Output ArrayOfFileSignatureType object</param>
  1768. /// <param name="exception">output Exception value if deserialize failed</param>
  1769. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  1770. public static bool LoadFromFile(string fileName, out ArrayOfFileSignatureType obj, out System.Exception exception)
  1771. {
  1772. exception = null;
  1773. obj = default(ArrayOfFileSignatureType);
  1774. try
  1775. {
  1776. obj = LoadFromFile(fileName);
  1777. return true;
  1778. }
  1779. catch (System.Exception ex)
  1780. {
  1781. exception = ex;
  1782. return false;
  1783. }
  1784. }
  1785. public static bool LoadFromFile(string fileName, out ArrayOfFileSignatureType obj)
  1786. {
  1787. System.Exception exception = null;
  1788. return LoadFromFile(fileName, out obj, out exception);
  1789. }
  1790. public static ArrayOfFileSignatureType LoadFromFile(string fileName)
  1791. {
  1792. System.IO.FileStream file = null;
  1793. System.IO.StreamReader sr = null;
  1794. try
  1795. {
  1796. file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
  1797. sr = new System.IO.StreamReader(file);
  1798. string xmlString = sr.ReadToEnd();
  1799. sr.Close();
  1800. file.Close();
  1801. return Deserialize(xmlString);
  1802. }
  1803. finally
  1804. {
  1805. if ((file != null))
  1806. {
  1807. file.Dispose();
  1808. }
  1809. if ((sr != null))
  1810. {
  1811. sr.Dispose();
  1812. }
  1813. }
  1814. }
  1815. #endregion
  1816. }
  1817. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
  1818. [System.SerializableAttribute()]
  1819. [System.ComponentModel.DesignerCategoryAttribute("code")]
  1820. [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://e-dokumenty.mf.gov.pl")]
  1821. public partial class ArrayOfFileSignatureTypePackaging
  1822. {
  1823. private ArrayOfFileSignatureTypePackagingSplitZip itemField;
  1824. private static System.Xml.Serialization.XmlSerializer serializer;
  1825. public ArrayOfFileSignatureTypePackaging()
  1826. {
  1827. this.itemField = new ArrayOfFileSignatureTypePackagingSplitZip();
  1828. }
  1829. [System.Xml.Serialization.XmlElementAttribute("SplitZip", Order = 0)]
  1830. public ArrayOfFileSignatureTypePackagingSplitZip Item
  1831. {
  1832. get
  1833. {
  1834. return this.itemField;
  1835. }
  1836. set
  1837. {
  1838. this.itemField = value;
  1839. }
  1840. }
  1841. private static System.Xml.Serialization.XmlSerializer Serializer
  1842. {
  1843. get
  1844. {
  1845. if ((serializer == null))
  1846. {
  1847. serializer = new System.Xml.Serialization.XmlSerializer(typeof(ArrayOfFileSignatureTypePackaging));
  1848. }
  1849. return serializer;
  1850. }
  1851. }
  1852. #region Serialize/Deserialize
  1853. /// <summary>
  1854. /// Serializes current ArrayOfFileSignatureTypePackaging object into an XML document
  1855. /// </summary>
  1856. /// <returns>string XML value</returns>
  1857. public virtual string Serialize()
  1858. {
  1859. System.IO.StreamReader streamReader = null;
  1860. System.IO.MemoryStream memoryStream = null;
  1861. try
  1862. {
  1863. memoryStream = new System.IO.MemoryStream();
  1864. Serializer.Serialize(memoryStream, this);
  1865. memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
  1866. streamReader = new System.IO.StreamReader(memoryStream);
  1867. return streamReader.ReadToEnd();
  1868. }
  1869. finally
  1870. {
  1871. if ((streamReader != null))
  1872. {
  1873. streamReader.Dispose();
  1874. }
  1875. if ((memoryStream != null))
  1876. {
  1877. memoryStream.Dispose();
  1878. }
  1879. }
  1880. }
  1881. /// <summary>
  1882. /// Deserializes workflow markup into an ArrayOfFileSignatureTypePackaging object
  1883. /// </summary>
  1884. /// <param name="xml">string workflow markup to deserialize</param>
  1885. /// <param name="obj">Output ArrayOfFileSignatureTypePackaging object</param>
  1886. /// <param name="exception">output Exception value if deserialize failed</param>
  1887. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  1888. public static bool Deserialize(string xml, out ArrayOfFileSignatureTypePackaging obj, out System.Exception exception)
  1889. {
  1890. exception = null;
  1891. obj = default(ArrayOfFileSignatureTypePackaging);
  1892. try
  1893. {
  1894. obj = Deserialize(xml);
  1895. return true;
  1896. }
  1897. catch (System.Exception ex)
  1898. {
  1899. exception = ex;
  1900. return false;
  1901. }
  1902. }
  1903. public static bool Deserialize(string xml, out ArrayOfFileSignatureTypePackaging obj)
  1904. {
  1905. System.Exception exception = null;
  1906. return Deserialize(xml, out obj, out exception);
  1907. }
  1908. public static ArrayOfFileSignatureTypePackaging Deserialize(string xml)
  1909. {
  1910. System.IO.StringReader stringReader = null;
  1911. try
  1912. {
  1913. stringReader = new System.IO.StringReader(xml);
  1914. return ((ArrayOfFileSignatureTypePackaging)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
  1915. }
  1916. finally
  1917. {
  1918. if ((stringReader != null))
  1919. {
  1920. stringReader.Dispose();
  1921. }
  1922. }
  1923. }
  1924. /// <summary>
  1925. /// Serializes current ArrayOfFileSignatureTypePackaging object into file
  1926. /// </summary>
  1927. /// <param name="fileName">full path of outupt xml file</param>
  1928. /// <param name="exception">output Exception value if failed</param>
  1929. /// <returns>true if can serialize and save into file; otherwise, false</returns>
  1930. public virtual bool SaveToFile(string fileName, out System.Exception exception)
  1931. {
  1932. exception = null;
  1933. try
  1934. {
  1935. SaveToFile(fileName);
  1936. return true;
  1937. }
  1938. catch (System.Exception e)
  1939. {
  1940. exception = e;
  1941. return false;
  1942. }
  1943. }
  1944. public virtual void SaveToFile(string fileName)
  1945. {
  1946. System.IO.StreamWriter streamWriter = null;
  1947. try
  1948. {
  1949. string xmlString = Serialize();
  1950. System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
  1951. streamWriter = xmlFile.CreateText();
  1952. streamWriter.WriteLine(xmlString);
  1953. streamWriter.Close();
  1954. }
  1955. finally
  1956. {
  1957. if ((streamWriter != null))
  1958. {
  1959. streamWriter.Dispose();
  1960. }
  1961. }
  1962. }
  1963. /// <summary>
  1964. /// Deserializes xml markup from file into an ArrayOfFileSignatureTypePackaging object
  1965. /// </summary>
  1966. /// <param name="fileName">string xml file to load and deserialize</param>
  1967. /// <param name="obj">Output ArrayOfFileSignatureTypePackaging object</param>
  1968. /// <param name="exception">output Exception value if deserialize failed</param>
  1969. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  1970. public static bool LoadFromFile(string fileName, out ArrayOfFileSignatureTypePackaging obj, out System.Exception exception)
  1971. {
  1972. exception = null;
  1973. obj = default(ArrayOfFileSignatureTypePackaging);
  1974. try
  1975. {
  1976. obj = LoadFromFile(fileName);
  1977. return true;
  1978. }
  1979. catch (System.Exception ex)
  1980. {
  1981. exception = ex;
  1982. return false;
  1983. }
  1984. }
  1985. public static bool LoadFromFile(string fileName, out ArrayOfFileSignatureTypePackaging obj)
  1986. {
  1987. System.Exception exception = null;
  1988. return LoadFromFile(fileName, out obj, out exception);
  1989. }
  1990. public static ArrayOfFileSignatureTypePackaging LoadFromFile(string fileName)
  1991. {
  1992. System.IO.FileStream file = null;
  1993. System.IO.StreamReader sr = null;
  1994. try
  1995. {
  1996. file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
  1997. sr = new System.IO.StreamReader(file);
  1998. string xmlString = sr.ReadToEnd();
  1999. sr.Close();
  2000. file.Close();
  2001. return Deserialize(xmlString);
  2002. }
  2003. finally
  2004. {
  2005. if ((file != null))
  2006. {
  2007. file.Dispose();
  2008. }
  2009. if ((sr != null))
  2010. {
  2011. sr.Dispose();
  2012. }
  2013. }
  2014. }
  2015. #endregion
  2016. }
  2017. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
  2018. [System.SerializableAttribute()]
  2019. [System.ComponentModel.DesignerCategoryAttribute("code")]
  2020. [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://e-dokumenty.mf.gov.pl")]
  2021. public partial class ArrayOfFileSignatureTypePackagingSplitZip
  2022. {
  2023. private string typeField;
  2024. private string modeField;
  2025. private static System.Xml.Serialization.XmlSerializer serializer;
  2026. public ArrayOfFileSignatureTypePackagingSplitZip()
  2027. {
  2028. this.typeField = "split";
  2029. this.modeField = "zip";
  2030. }
  2031. [System.Xml.Serialization.XmlAttributeAttribute()]
  2032. public string type
  2033. {
  2034. get
  2035. {
  2036. return this.typeField;
  2037. }
  2038. set
  2039. {
  2040. this.typeField = value;
  2041. }
  2042. }
  2043. [System.Xml.Serialization.XmlAttributeAttribute()]
  2044. public string mode
  2045. {
  2046. get
  2047. {
  2048. return this.modeField;
  2049. }
  2050. set
  2051. {
  2052. this.modeField = value;
  2053. }
  2054. }
  2055. private static System.Xml.Serialization.XmlSerializer Serializer
  2056. {
  2057. get
  2058. {
  2059. if ((serializer == null))
  2060. {
  2061. serializer = new System.Xml.Serialization.XmlSerializer(typeof(ArrayOfFileSignatureTypePackagingSplitZip));
  2062. }
  2063. return serializer;
  2064. }
  2065. }
  2066. #region Serialize/Deserialize
  2067. /// <summary>
  2068. /// Serializes current ArrayOfFileSignatureTypePackagingSplitZip object into an XML document
  2069. /// </summary>
  2070. /// <returns>string XML value</returns>
  2071. public virtual string Serialize()
  2072. {
  2073. System.IO.StreamReader streamReader = null;
  2074. System.IO.MemoryStream memoryStream = null;
  2075. try
  2076. {
  2077. memoryStream = new System.IO.MemoryStream();
  2078. Serializer.Serialize(memoryStream, this);
  2079. memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
  2080. streamReader = new System.IO.StreamReader(memoryStream);
  2081. return streamReader.ReadToEnd();
  2082. }
  2083. finally
  2084. {
  2085. if ((streamReader != null))
  2086. {
  2087. streamReader.Dispose();
  2088. }
  2089. if ((memoryStream != null))
  2090. {
  2091. memoryStream.Dispose();
  2092. }
  2093. }
  2094. }
  2095. /// <summary>
  2096. /// Deserializes workflow markup into an ArrayOfFileSignatureTypePackagingSplitZip object
  2097. /// </summary>
  2098. /// <param name="xml">string workflow markup to deserialize</param>
  2099. /// <param name="obj">Output ArrayOfFileSignatureTypePackagingSplitZip object</param>
  2100. /// <param name="exception">output Exception value if deserialize failed</param>
  2101. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  2102. public static bool Deserialize(string xml, out ArrayOfFileSignatureTypePackagingSplitZip obj, out System.Exception exception)
  2103. {
  2104. exception = null;
  2105. obj = default(ArrayOfFileSignatureTypePackagingSplitZip);
  2106. try
  2107. {
  2108. obj = Deserialize(xml);
  2109. return true;
  2110. }
  2111. catch (System.Exception ex)
  2112. {
  2113. exception = ex;
  2114. return false;
  2115. }
  2116. }
  2117. public static bool Deserialize(string xml, out ArrayOfFileSignatureTypePackagingSplitZip obj)
  2118. {
  2119. System.Exception exception = null;
  2120. return Deserialize(xml, out obj, out exception);
  2121. }
  2122. public static ArrayOfFileSignatureTypePackagingSplitZip Deserialize(string xml)
  2123. {
  2124. System.IO.StringReader stringReader = null;
  2125. try
  2126. {
  2127. stringReader = new System.IO.StringReader(xml);
  2128. return ((ArrayOfFileSignatureTypePackagingSplitZip)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
  2129. }
  2130. finally
  2131. {
  2132. if ((stringReader != null))
  2133. {
  2134. stringReader.Dispose();
  2135. }
  2136. }
  2137. }
  2138. /// <summary>
  2139. /// Serializes current ArrayOfFileSignatureTypePackagingSplitZip object into file
  2140. /// </summary>
  2141. /// <param name="fileName">full path of outupt xml file</param>
  2142. /// <param name="exception">output Exception value if failed</param>
  2143. /// <returns>true if can serialize and save into file; otherwise, false</returns>
  2144. public virtual bool SaveToFile(string fileName, out System.Exception exception)
  2145. {
  2146. exception = null;
  2147. try
  2148. {
  2149. SaveToFile(fileName);
  2150. return true;
  2151. }
  2152. catch (System.Exception e)
  2153. {
  2154. exception = e;
  2155. return false;
  2156. }
  2157. }
  2158. public virtual void SaveToFile(string fileName)
  2159. {
  2160. System.IO.StreamWriter streamWriter = null;
  2161. try
  2162. {
  2163. string xmlString = Serialize();
  2164. System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
  2165. streamWriter = xmlFile.CreateText();
  2166. streamWriter.WriteLine(xmlString);
  2167. streamWriter.Close();
  2168. }
  2169. finally
  2170. {
  2171. if ((streamWriter != null))
  2172. {
  2173. streamWriter.Dispose();
  2174. }
  2175. }
  2176. }
  2177. /// <summary>
  2178. /// Deserializes xml markup from file into an ArrayOfFileSignatureTypePackagingSplitZip object
  2179. /// </summary>
  2180. /// <param name="fileName">string xml file to load and deserialize</param>
  2181. /// <param name="obj">Output ArrayOfFileSignatureTypePackagingSplitZip object</param>
  2182. /// <param name="exception">output Exception value if deserialize failed</param>
  2183. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  2184. public static bool LoadFromFile(string fileName, out ArrayOfFileSignatureTypePackagingSplitZip obj, out System.Exception exception)
  2185. {
  2186. exception = null;
  2187. obj = default(ArrayOfFileSignatureTypePackagingSplitZip);
  2188. try
  2189. {
  2190. obj = LoadFromFile(fileName);
  2191. return true;
  2192. }
  2193. catch (System.Exception ex)
  2194. {
  2195. exception = ex;
  2196. return false;
  2197. }
  2198. }
  2199. public static bool LoadFromFile(string fileName, out ArrayOfFileSignatureTypePackagingSplitZip obj)
  2200. {
  2201. System.Exception exception = null;
  2202. return LoadFromFile(fileName, out obj, out exception);
  2203. }
  2204. public static ArrayOfFileSignatureTypePackagingSplitZip LoadFromFile(string fileName)
  2205. {
  2206. System.IO.FileStream file = null;
  2207. System.IO.StreamReader sr = null;
  2208. try
  2209. {
  2210. file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
  2211. sr = new System.IO.StreamReader(file);
  2212. string xmlString = sr.ReadToEnd();
  2213. sr.Close();
  2214. file.Close();
  2215. return Deserialize(xmlString);
  2216. }
  2217. finally
  2218. {
  2219. if ((file != null))
  2220. {
  2221. file.Dispose();
  2222. }
  2223. if ((sr != null))
  2224. {
  2225. sr.Dispose();
  2226. }
  2227. }
  2228. }
  2229. #endregion
  2230. }
  2231. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
  2232. [System.SerializableAttribute()]
  2233. [System.ComponentModel.DesignerCategoryAttribute("code")]
  2234. [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://e-dokumenty.mf.gov.pl")]
  2235. public partial class ArrayOfFileSignatureTypeEncryption
  2236. {
  2237. private ArrayOfFileSignatureTypeEncryptionAES itemField;
  2238. private static System.Xml.Serialization.XmlSerializer serializer;
  2239. public ArrayOfFileSignatureTypeEncryption()
  2240. {
  2241. this.itemField = new ArrayOfFileSignatureTypeEncryptionAES();
  2242. }
  2243. [System.Xml.Serialization.XmlElementAttribute("AES", Order = 0)]
  2244. public ArrayOfFileSignatureTypeEncryptionAES Item
  2245. {
  2246. get
  2247. {
  2248. return this.itemField;
  2249. }
  2250. set
  2251. {
  2252. this.itemField = value;
  2253. }
  2254. }
  2255. private static System.Xml.Serialization.XmlSerializer Serializer
  2256. {
  2257. get
  2258. {
  2259. if ((serializer == null))
  2260. {
  2261. serializer = new System.Xml.Serialization.XmlSerializer(typeof(ArrayOfFileSignatureTypeEncryption));
  2262. }
  2263. return serializer;
  2264. }
  2265. }
  2266. #region Serialize/Deserialize
  2267. /// <summary>
  2268. /// Serializes current ArrayOfFileSignatureTypeEncryption object into an XML document
  2269. /// </summary>
  2270. /// <returns>string XML value</returns>
  2271. public virtual string Serialize()
  2272. {
  2273. System.IO.StreamReader streamReader = null;
  2274. System.IO.MemoryStream memoryStream = null;
  2275. try
  2276. {
  2277. memoryStream = new System.IO.MemoryStream();
  2278. Serializer.Serialize(memoryStream, this);
  2279. memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
  2280. streamReader = new System.IO.StreamReader(memoryStream);
  2281. return streamReader.ReadToEnd();
  2282. }
  2283. finally
  2284. {
  2285. if ((streamReader != null))
  2286. {
  2287. streamReader.Dispose();
  2288. }
  2289. if ((memoryStream != null))
  2290. {
  2291. memoryStream.Dispose();
  2292. }
  2293. }
  2294. }
  2295. /// <summary>
  2296. /// Deserializes workflow markup into an ArrayOfFileSignatureTypeEncryption object
  2297. /// </summary>
  2298. /// <param name="xml">string workflow markup to deserialize</param>
  2299. /// <param name="obj">Output ArrayOfFileSignatureTypeEncryption object</param>
  2300. /// <param name="exception">output Exception value if deserialize failed</param>
  2301. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  2302. public static bool Deserialize(string xml, out ArrayOfFileSignatureTypeEncryption obj, out System.Exception exception)
  2303. {
  2304. exception = null;
  2305. obj = default(ArrayOfFileSignatureTypeEncryption);
  2306. try
  2307. {
  2308. obj = Deserialize(xml);
  2309. return true;
  2310. }
  2311. catch (System.Exception ex)
  2312. {
  2313. exception = ex;
  2314. return false;
  2315. }
  2316. }
  2317. public static bool Deserialize(string xml, out ArrayOfFileSignatureTypeEncryption obj)
  2318. {
  2319. System.Exception exception = null;
  2320. return Deserialize(xml, out obj, out exception);
  2321. }
  2322. public static ArrayOfFileSignatureTypeEncryption Deserialize(string xml)
  2323. {
  2324. System.IO.StringReader stringReader = null;
  2325. try
  2326. {
  2327. stringReader = new System.IO.StringReader(xml);
  2328. return ((ArrayOfFileSignatureTypeEncryption)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
  2329. }
  2330. finally
  2331. {
  2332. if ((stringReader != null))
  2333. {
  2334. stringReader.Dispose();
  2335. }
  2336. }
  2337. }
  2338. /// <summary>
  2339. /// Serializes current ArrayOfFileSignatureTypeEncryption object into file
  2340. /// </summary>
  2341. /// <param name="fileName">full path of outupt xml file</param>
  2342. /// <param name="exception">output Exception value if failed</param>
  2343. /// <returns>true if can serialize and save into file; otherwise, false</returns>
  2344. public virtual bool SaveToFile(string fileName, out System.Exception exception)
  2345. {
  2346. exception = null;
  2347. try
  2348. {
  2349. SaveToFile(fileName);
  2350. return true;
  2351. }
  2352. catch (System.Exception e)
  2353. {
  2354. exception = e;
  2355. return false;
  2356. }
  2357. }
  2358. public virtual void SaveToFile(string fileName)
  2359. {
  2360. System.IO.StreamWriter streamWriter = null;
  2361. try
  2362. {
  2363. string xmlString = Serialize();
  2364. System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
  2365. streamWriter = xmlFile.CreateText();
  2366. streamWriter.WriteLine(xmlString);
  2367. streamWriter.Close();
  2368. }
  2369. finally
  2370. {
  2371. if ((streamWriter != null))
  2372. {
  2373. streamWriter.Dispose();
  2374. }
  2375. }
  2376. }
  2377. /// <summary>
  2378. /// Deserializes xml markup from file into an ArrayOfFileSignatureTypeEncryption object
  2379. /// </summary>
  2380. /// <param name="fileName">string xml file to load and deserialize</param>
  2381. /// <param name="obj">Output ArrayOfFileSignatureTypeEncryption object</param>
  2382. /// <param name="exception">output Exception value if deserialize failed</param>
  2383. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  2384. public static bool LoadFromFile(string fileName, out ArrayOfFileSignatureTypeEncryption obj, out System.Exception exception)
  2385. {
  2386. exception = null;
  2387. obj = default(ArrayOfFileSignatureTypeEncryption);
  2388. try
  2389. {
  2390. obj = LoadFromFile(fileName);
  2391. return true;
  2392. }
  2393. catch (System.Exception ex)
  2394. {
  2395. exception = ex;
  2396. return false;
  2397. }
  2398. }
  2399. public static bool LoadFromFile(string fileName, out ArrayOfFileSignatureTypeEncryption obj)
  2400. {
  2401. System.Exception exception = null;
  2402. return LoadFromFile(fileName, out obj, out exception);
  2403. }
  2404. public static ArrayOfFileSignatureTypeEncryption LoadFromFile(string fileName)
  2405. {
  2406. System.IO.FileStream file = null;
  2407. System.IO.StreamReader sr = null;
  2408. try
  2409. {
  2410. file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
  2411. sr = new System.IO.StreamReader(file);
  2412. string xmlString = sr.ReadToEnd();
  2413. sr.Close();
  2414. file.Close();
  2415. return Deserialize(xmlString);
  2416. }
  2417. finally
  2418. {
  2419. if ((file != null))
  2420. {
  2421. file.Dispose();
  2422. }
  2423. if ((sr != null))
  2424. {
  2425. sr.Dispose();
  2426. }
  2427. }
  2428. }
  2429. #endregion
  2430. }
  2431. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
  2432. [System.SerializableAttribute()]
  2433. [System.ComponentModel.DesignerCategoryAttribute("code")]
  2434. [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://e-dokumenty.mf.gov.pl")]
  2435. public partial class ArrayOfFileSignatureTypeEncryptionAES
  2436. {
  2437. private ArrayOfFileSignatureTypeEncryptionAESIV ivField;
  2438. private int sizeField;
  2439. private int blockField;
  2440. private string modeField;
  2441. private string paddingField;
  2442. private static System.Xml.Serialization.XmlSerializer serializer;
  2443. public ArrayOfFileSignatureTypeEncryptionAES()
  2444. {
  2445. this.ivField = new ArrayOfFileSignatureTypeEncryptionAESIV();
  2446. this.sizeField = 256;
  2447. this.blockField = 16;
  2448. this.modeField = "CBC";
  2449. this.paddingField = "PKCS#7";
  2450. }
  2451. [System.Xml.Serialization.XmlElementAttribute(Order = 0)]
  2452. public ArrayOfFileSignatureTypeEncryptionAESIV IV
  2453. {
  2454. get
  2455. {
  2456. return this.ivField;
  2457. }
  2458. set
  2459. {
  2460. this.ivField = value;
  2461. }
  2462. }
  2463. [System.Xml.Serialization.XmlAttributeAttribute()]
  2464. public int size
  2465. {
  2466. get
  2467. {
  2468. return this.sizeField;
  2469. }
  2470. set
  2471. {
  2472. this.sizeField = value;
  2473. }
  2474. }
  2475. [System.Xml.Serialization.XmlAttributeAttribute()]
  2476. public int block
  2477. {
  2478. get
  2479. {
  2480. return this.blockField;
  2481. }
  2482. set
  2483. {
  2484. this.blockField = value;
  2485. }
  2486. }
  2487. [System.Xml.Serialization.XmlAttributeAttribute()]
  2488. public string mode
  2489. {
  2490. get
  2491. {
  2492. return this.modeField;
  2493. }
  2494. set
  2495. {
  2496. this.modeField = value;
  2497. }
  2498. }
  2499. [System.Xml.Serialization.XmlAttributeAttribute()]
  2500. public string padding
  2501. {
  2502. get
  2503. {
  2504. return this.paddingField;
  2505. }
  2506. set
  2507. {
  2508. this.paddingField = value;
  2509. }
  2510. }
  2511. private static System.Xml.Serialization.XmlSerializer Serializer
  2512. {
  2513. get
  2514. {
  2515. if ((serializer == null))
  2516. {
  2517. serializer = new System.Xml.Serialization.XmlSerializer(typeof(ArrayOfFileSignatureTypeEncryptionAES));
  2518. }
  2519. return serializer;
  2520. }
  2521. }
  2522. #region Serialize/Deserialize
  2523. /// <summary>
  2524. /// Serializes current ArrayOfFileSignatureTypeEncryptionAES object into an XML document
  2525. /// </summary>
  2526. /// <returns>string XML value</returns>
  2527. public virtual string Serialize()
  2528. {
  2529. System.IO.StreamReader streamReader = null;
  2530. System.IO.MemoryStream memoryStream = null;
  2531. try
  2532. {
  2533. memoryStream = new System.IO.MemoryStream();
  2534. Serializer.Serialize(memoryStream, this);
  2535. memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
  2536. streamReader = new System.IO.StreamReader(memoryStream);
  2537. return streamReader.ReadToEnd();
  2538. }
  2539. finally
  2540. {
  2541. if ((streamReader != null))
  2542. {
  2543. streamReader.Dispose();
  2544. }
  2545. if ((memoryStream != null))
  2546. {
  2547. memoryStream.Dispose();
  2548. }
  2549. }
  2550. }
  2551. /// <summary>
  2552. /// Deserializes workflow markup into an ArrayOfFileSignatureTypeEncryptionAES object
  2553. /// </summary>
  2554. /// <param name="xml">string workflow markup to deserialize</param>
  2555. /// <param name="obj">Output ArrayOfFileSignatureTypeEncryptionAES object</param>
  2556. /// <param name="exception">output Exception value if deserialize failed</param>
  2557. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  2558. public static bool Deserialize(string xml, out ArrayOfFileSignatureTypeEncryptionAES obj, out System.Exception exception)
  2559. {
  2560. exception = null;
  2561. obj = default(ArrayOfFileSignatureTypeEncryptionAES);
  2562. try
  2563. {
  2564. obj = Deserialize(xml);
  2565. return true;
  2566. }
  2567. catch (System.Exception ex)
  2568. {
  2569. exception = ex;
  2570. return false;
  2571. }
  2572. }
  2573. public static bool Deserialize(string xml, out ArrayOfFileSignatureTypeEncryptionAES obj)
  2574. {
  2575. System.Exception exception = null;
  2576. return Deserialize(xml, out obj, out exception);
  2577. }
  2578. public static ArrayOfFileSignatureTypeEncryptionAES Deserialize(string xml)
  2579. {
  2580. System.IO.StringReader stringReader = null;
  2581. try
  2582. {
  2583. stringReader = new System.IO.StringReader(xml);
  2584. return ((ArrayOfFileSignatureTypeEncryptionAES)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
  2585. }
  2586. finally
  2587. {
  2588. if ((stringReader != null))
  2589. {
  2590. stringReader.Dispose();
  2591. }
  2592. }
  2593. }
  2594. /// <summary>
  2595. /// Serializes current ArrayOfFileSignatureTypeEncryptionAES object into file
  2596. /// </summary>
  2597. /// <param name="fileName">full path of outupt xml file</param>
  2598. /// <param name="exception">output Exception value if failed</param>
  2599. /// <returns>true if can serialize and save into file; otherwise, false</returns>
  2600. public virtual bool SaveToFile(string fileName, out System.Exception exception)
  2601. {
  2602. exception = null;
  2603. try
  2604. {
  2605. SaveToFile(fileName);
  2606. return true;
  2607. }
  2608. catch (System.Exception e)
  2609. {
  2610. exception = e;
  2611. return false;
  2612. }
  2613. }
  2614. public virtual void SaveToFile(string fileName)
  2615. {
  2616. System.IO.StreamWriter streamWriter = null;
  2617. try
  2618. {
  2619. string xmlString = Serialize();
  2620. System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
  2621. streamWriter = xmlFile.CreateText();
  2622. streamWriter.WriteLine(xmlString);
  2623. streamWriter.Close();
  2624. }
  2625. finally
  2626. {
  2627. if ((streamWriter != null))
  2628. {
  2629. streamWriter.Dispose();
  2630. }
  2631. }
  2632. }
  2633. /// <summary>
  2634. /// Deserializes xml markup from file into an ArrayOfFileSignatureTypeEncryptionAES object
  2635. /// </summary>
  2636. /// <param name="fileName">string xml file to load and deserialize</param>
  2637. /// <param name="obj">Output ArrayOfFileSignatureTypeEncryptionAES object</param>
  2638. /// <param name="exception">output Exception value if deserialize failed</param>
  2639. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  2640. public static bool LoadFromFile(string fileName, out ArrayOfFileSignatureTypeEncryptionAES obj, out System.Exception exception)
  2641. {
  2642. exception = null;
  2643. obj = default(ArrayOfFileSignatureTypeEncryptionAES);
  2644. try
  2645. {
  2646. obj = LoadFromFile(fileName);
  2647. return true;
  2648. }
  2649. catch (System.Exception ex)
  2650. {
  2651. exception = ex;
  2652. return false;
  2653. }
  2654. }
  2655. public static bool LoadFromFile(string fileName, out ArrayOfFileSignatureTypeEncryptionAES obj)
  2656. {
  2657. System.Exception exception = null;
  2658. return LoadFromFile(fileName, out obj, out exception);
  2659. }
  2660. public static ArrayOfFileSignatureTypeEncryptionAES LoadFromFile(string fileName)
  2661. {
  2662. System.IO.FileStream file = null;
  2663. System.IO.StreamReader sr = null;
  2664. try
  2665. {
  2666. file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
  2667. sr = new System.IO.StreamReader(file);
  2668. string xmlString = sr.ReadToEnd();
  2669. sr.Close();
  2670. file.Close();
  2671. return Deserialize(xmlString);
  2672. }
  2673. finally
  2674. {
  2675. if ((file != null))
  2676. {
  2677. file.Dispose();
  2678. }
  2679. if ((sr != null))
  2680. {
  2681. sr.Dispose();
  2682. }
  2683. }
  2684. }
  2685. #endregion
  2686. }
  2687. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
  2688. [System.SerializableAttribute()]
  2689. [System.ComponentModel.DesignerCategoryAttribute("code")]
  2690. [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://e-dokumenty.mf.gov.pl")]
  2691. public partial class ArrayOfFileSignatureTypeEncryptionAESIV : EncryptionAESIVType
  2692. {
  2693. private static System.Xml.Serialization.XmlSerializer serializer;
  2694. private static System.Xml.Serialization.XmlSerializer Serializer
  2695. {
  2696. get
  2697. {
  2698. if ((serializer == null))
  2699. {
  2700. serializer = new System.Xml.Serialization.XmlSerializer(typeof(ArrayOfFileSignatureTypeEncryptionAESIV));
  2701. }
  2702. return serializer;
  2703. }
  2704. }
  2705. #region Serialize/Deserialize
  2706. /// <summary>
  2707. /// Serializes current ArrayOfFileSignatureTypeEncryptionAESIV object into an XML document
  2708. /// </summary>
  2709. /// <returns>string XML value</returns>
  2710. public virtual string Serialize()
  2711. {
  2712. System.IO.StreamReader streamReader = null;
  2713. System.IO.MemoryStream memoryStream = null;
  2714. try
  2715. {
  2716. memoryStream = new System.IO.MemoryStream();
  2717. Serializer.Serialize(memoryStream, this);
  2718. memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
  2719. streamReader = new System.IO.StreamReader(memoryStream);
  2720. return streamReader.ReadToEnd();
  2721. }
  2722. finally
  2723. {
  2724. if ((streamReader != null))
  2725. {
  2726. streamReader.Dispose();
  2727. }
  2728. if ((memoryStream != null))
  2729. {
  2730. memoryStream.Dispose();
  2731. }
  2732. }
  2733. }
  2734. /// <summary>
  2735. /// Deserializes workflow markup into an ArrayOfFileSignatureTypeEncryptionAESIV object
  2736. /// </summary>
  2737. /// <param name="xml">string workflow markup to deserialize</param>
  2738. /// <param name="obj">Output ArrayOfFileSignatureTypeEncryptionAESIV object</param>
  2739. /// <param name="exception">output Exception value if deserialize failed</param>
  2740. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  2741. public static bool Deserialize(string xml, out ArrayOfFileSignatureTypeEncryptionAESIV obj, out System.Exception exception)
  2742. {
  2743. exception = null;
  2744. obj = default(ArrayOfFileSignatureTypeEncryptionAESIV);
  2745. try
  2746. {
  2747. obj = Deserialize(xml);
  2748. return true;
  2749. }
  2750. catch (System.Exception ex)
  2751. {
  2752. exception = ex;
  2753. return false;
  2754. }
  2755. }
  2756. public static bool Deserialize(string xml, out ArrayOfFileSignatureTypeEncryptionAESIV obj)
  2757. {
  2758. System.Exception exception = null;
  2759. return Deserialize(xml, out obj, out exception);
  2760. }
  2761. public static ArrayOfFileSignatureTypeEncryptionAESIV Deserialize(string xml)
  2762. {
  2763. System.IO.StringReader stringReader = null;
  2764. try
  2765. {
  2766. stringReader = new System.IO.StringReader(xml);
  2767. return ((ArrayOfFileSignatureTypeEncryptionAESIV)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
  2768. }
  2769. finally
  2770. {
  2771. if ((stringReader != null))
  2772. {
  2773. stringReader.Dispose();
  2774. }
  2775. }
  2776. }
  2777. /// <summary>
  2778. /// Serializes current ArrayOfFileSignatureTypeEncryptionAESIV object into file
  2779. /// </summary>
  2780. /// <param name="fileName">full path of outupt xml file</param>
  2781. /// <param name="exception">output Exception value if failed</param>
  2782. /// <returns>true if can serialize and save into file; otherwise, false</returns>
  2783. public virtual bool SaveToFile(string fileName, out System.Exception exception)
  2784. {
  2785. exception = null;
  2786. try
  2787. {
  2788. SaveToFile(fileName);
  2789. return true;
  2790. }
  2791. catch (System.Exception e)
  2792. {
  2793. exception = e;
  2794. return false;
  2795. }
  2796. }
  2797. public virtual void SaveToFile(string fileName)
  2798. {
  2799. System.IO.StreamWriter streamWriter = null;
  2800. try
  2801. {
  2802. string xmlString = Serialize();
  2803. System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
  2804. streamWriter = xmlFile.CreateText();
  2805. streamWriter.WriteLine(xmlString);
  2806. streamWriter.Close();
  2807. }
  2808. finally
  2809. {
  2810. if ((streamWriter != null))
  2811. {
  2812. streamWriter.Dispose();
  2813. }
  2814. }
  2815. }
  2816. /// <summary>
  2817. /// Deserializes xml markup from file into an ArrayOfFileSignatureTypeEncryptionAESIV object
  2818. /// </summary>
  2819. /// <param name="fileName">string xml file to load and deserialize</param>
  2820. /// <param name="obj">Output ArrayOfFileSignatureTypeEncryptionAESIV object</param>
  2821. /// <param name="exception">output Exception value if deserialize failed</param>
  2822. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  2823. public static bool LoadFromFile(string fileName, out ArrayOfFileSignatureTypeEncryptionAESIV obj, out System.Exception exception)
  2824. {
  2825. exception = null;
  2826. obj = default(ArrayOfFileSignatureTypeEncryptionAESIV);
  2827. try
  2828. {
  2829. obj = LoadFromFile(fileName);
  2830. return true;
  2831. }
  2832. catch (System.Exception ex)
  2833. {
  2834. exception = ex;
  2835. return false;
  2836. }
  2837. }
  2838. public static bool LoadFromFile(string fileName, out ArrayOfFileSignatureTypeEncryptionAESIV obj)
  2839. {
  2840. System.Exception exception = null;
  2841. return LoadFromFile(fileName, out obj, out exception);
  2842. }
  2843. public static ArrayOfFileSignatureTypeEncryptionAESIV LoadFromFile(string fileName)
  2844. {
  2845. System.IO.FileStream file = null;
  2846. System.IO.StreamReader sr = null;
  2847. try
  2848. {
  2849. file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
  2850. sr = new System.IO.StreamReader(file);
  2851. string xmlString = sr.ReadToEnd();
  2852. sr.Close();
  2853. file.Close();
  2854. return Deserialize(xmlString);
  2855. }
  2856. finally
  2857. {
  2858. if ((file != null))
  2859. {
  2860. file.Dispose();
  2861. }
  2862. if ((sr != null))
  2863. {
  2864. sr.Dispose();
  2865. }
  2866. }
  2867. }
  2868. #endregion
  2869. }
  2870. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
  2871. [System.SerializableAttribute()]
  2872. [System.ComponentModel.DesignerCategoryAttribute("code")]
  2873. [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://e-dokumenty.mf.gov.pl")]
  2874. [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://e-dokumenty.mf.gov.pl", IsNullable = true)]
  2875. public partial class HashValueSHAType
  2876. {
  2877. private string algorithmField;
  2878. private string encodingField;
  2879. private string valueField;
  2880. private static System.Xml.Serialization.XmlSerializer serializer;
  2881. public HashValueSHAType()
  2882. {
  2883. this.algorithmField = "SHA-256";
  2884. this.encodingField = "Base64";
  2885. }
  2886. [System.Xml.Serialization.XmlAttributeAttribute()]
  2887. public string algorithm
  2888. {
  2889. get
  2890. {
  2891. return this.algorithmField;
  2892. }
  2893. set
  2894. {
  2895. this.algorithmField = value;
  2896. }
  2897. }
  2898. [System.Xml.Serialization.XmlAttributeAttribute()]
  2899. public string encoding
  2900. {
  2901. get
  2902. {
  2903. return this.encodingField;
  2904. }
  2905. set
  2906. {
  2907. this.encodingField = value;
  2908. }
  2909. }
  2910. [System.Xml.Serialization.XmlTextAttribute(DataType = "token")]
  2911. public string Value
  2912. {
  2913. get
  2914. {
  2915. return this.valueField;
  2916. }
  2917. set
  2918. {
  2919. this.valueField = value;
  2920. }
  2921. }
  2922. private static System.Xml.Serialization.XmlSerializer Serializer
  2923. {
  2924. get
  2925. {
  2926. if ((serializer == null))
  2927. {
  2928. serializer = new System.Xml.Serialization.XmlSerializer(typeof(HashValueSHAType));
  2929. }
  2930. return serializer;
  2931. }
  2932. }
  2933. #region Serialize/Deserialize
  2934. /// <summary>
  2935. /// Serializes current HashValueSHAType object into an XML document
  2936. /// </summary>
  2937. /// <returns>string XML value</returns>
  2938. public virtual string Serialize()
  2939. {
  2940. System.IO.StreamReader streamReader = null;
  2941. System.IO.MemoryStream memoryStream = null;
  2942. try
  2943. {
  2944. memoryStream = new System.IO.MemoryStream();
  2945. Serializer.Serialize(memoryStream, this);
  2946. memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
  2947. streamReader = new System.IO.StreamReader(memoryStream);
  2948. return streamReader.ReadToEnd();
  2949. }
  2950. finally
  2951. {
  2952. if ((streamReader != null))
  2953. {
  2954. streamReader.Dispose();
  2955. }
  2956. if ((memoryStream != null))
  2957. {
  2958. memoryStream.Dispose();
  2959. }
  2960. }
  2961. }
  2962. /// <summary>
  2963. /// Deserializes workflow markup into an HashValueSHAType object
  2964. /// </summary>
  2965. /// <param name="xml">string workflow markup to deserialize</param>
  2966. /// <param name="obj">Output HashValueSHAType object</param>
  2967. /// <param name="exception">output Exception value if deserialize failed</param>
  2968. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  2969. public static bool Deserialize(string xml, out HashValueSHAType obj, out System.Exception exception)
  2970. {
  2971. exception = null;
  2972. obj = default(HashValueSHAType);
  2973. try
  2974. {
  2975. obj = Deserialize(xml);
  2976. return true;
  2977. }
  2978. catch (System.Exception ex)
  2979. {
  2980. exception = ex;
  2981. return false;
  2982. }
  2983. }
  2984. public static bool Deserialize(string xml, out HashValueSHAType obj)
  2985. {
  2986. System.Exception exception = null;
  2987. return Deserialize(xml, out obj, out exception);
  2988. }
  2989. public static HashValueSHAType Deserialize(string xml)
  2990. {
  2991. System.IO.StringReader stringReader = null;
  2992. try
  2993. {
  2994. stringReader = new System.IO.StringReader(xml);
  2995. return ((HashValueSHAType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
  2996. }
  2997. finally
  2998. {
  2999. if ((stringReader != null))
  3000. {
  3001. stringReader.Dispose();
  3002. }
  3003. }
  3004. }
  3005. /// <summary>
  3006. /// Serializes current HashValueSHAType object into file
  3007. /// </summary>
  3008. /// <param name="fileName">full path of outupt xml file</param>
  3009. /// <param name="exception">output Exception value if failed</param>
  3010. /// <returns>true if can serialize and save into file; otherwise, false</returns>
  3011. public virtual bool SaveToFile(string fileName, out System.Exception exception)
  3012. {
  3013. exception = null;
  3014. try
  3015. {
  3016. SaveToFile(fileName);
  3017. return true;
  3018. }
  3019. catch (System.Exception e)
  3020. {
  3021. exception = e;
  3022. return false;
  3023. }
  3024. }
  3025. public virtual void SaveToFile(string fileName)
  3026. {
  3027. System.IO.StreamWriter streamWriter = null;
  3028. try
  3029. {
  3030. string xmlString = Serialize();
  3031. System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
  3032. streamWriter = xmlFile.CreateText();
  3033. streamWriter.WriteLine(xmlString);
  3034. streamWriter.Close();
  3035. }
  3036. finally
  3037. {
  3038. if ((streamWriter != null))
  3039. {
  3040. streamWriter.Dispose();
  3041. }
  3042. }
  3043. }
  3044. /// <summary>
  3045. /// Deserializes xml markup from file into an HashValueSHAType object
  3046. /// </summary>
  3047. /// <param name="fileName">string xml file to load and deserialize</param>
  3048. /// <param name="obj">Output HashValueSHAType object</param>
  3049. /// <param name="exception">output Exception value if deserialize failed</param>
  3050. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  3051. public static bool LoadFromFile(string fileName, out HashValueSHAType obj, out System.Exception exception)
  3052. {
  3053. exception = null;
  3054. obj = default(HashValueSHAType);
  3055. try
  3056. {
  3057. obj = LoadFromFile(fileName);
  3058. return true;
  3059. }
  3060. catch (System.Exception ex)
  3061. {
  3062. exception = ex;
  3063. return false;
  3064. }
  3065. }
  3066. public static bool LoadFromFile(string fileName, out HashValueSHAType obj)
  3067. {
  3068. System.Exception exception = null;
  3069. return LoadFromFile(fileName, out obj, out exception);
  3070. }
  3071. public static HashValueSHAType LoadFromFile(string fileName)
  3072. {
  3073. System.IO.FileStream file = null;
  3074. System.IO.StreamReader sr = null;
  3075. try
  3076. {
  3077. file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
  3078. sr = new System.IO.StreamReader(file);
  3079. string xmlString = sr.ReadToEnd();
  3080. sr.Close();
  3081. file.Close();
  3082. return Deserialize(xmlString);
  3083. }
  3084. finally
  3085. {
  3086. if ((file != null))
  3087. {
  3088. file.Dispose();
  3089. }
  3090. if ((sr != null))
  3091. {
  3092. sr.Dispose();
  3093. }
  3094. }
  3095. }
  3096. #endregion
  3097. }
  3098. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
  3099. [System.SerializableAttribute()]
  3100. [System.ComponentModel.DesignerCategoryAttribute("code")]
  3101. [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://e-dokumenty.mf.gov.pl")]
  3102. [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://e-dokumenty.mf.gov.pl", IsNullable = true)]
  3103. public partial class DocumentType
  3104. {
  3105. private DocumentTypeFormCode formCodeField;
  3106. private string fileNameField;
  3107. private long contentLengthField;
  3108. private DocumentTypeHashValue hashValueField;
  3109. private DocumentTypeFileSignatureList fileSignatureListField;
  3110. private static System.Xml.Serialization.XmlSerializer serializer;
  3111. public DocumentType()
  3112. {
  3113. this.fileSignatureListField = new DocumentTypeFileSignatureList();
  3114. this.hashValueField = new DocumentTypeHashValue();
  3115. this.formCodeField = new DocumentTypeFormCode();
  3116. }
  3117. [System.Xml.Serialization.XmlElementAttribute(Order = 0)]
  3118. public DocumentTypeFormCode FormCode
  3119. {
  3120. get
  3121. {
  3122. return this.formCodeField;
  3123. }
  3124. set
  3125. {
  3126. this.formCodeField = value;
  3127. }
  3128. }
  3129. [System.Xml.Serialization.XmlElementAttribute(Order = 1)]
  3130. public string FileName
  3131. {
  3132. get
  3133. {
  3134. return this.fileNameField;
  3135. }
  3136. set
  3137. {
  3138. this.fileNameField = value;
  3139. }
  3140. }
  3141. [System.Xml.Serialization.XmlElementAttribute(Order = 2)]
  3142. public long ContentLength
  3143. {
  3144. get
  3145. {
  3146. return this.contentLengthField;
  3147. }
  3148. set
  3149. {
  3150. this.contentLengthField = value;
  3151. }
  3152. }
  3153. [System.Xml.Serialization.XmlElementAttribute(Order = 3)]
  3154. public DocumentTypeHashValue HashValue
  3155. {
  3156. get
  3157. {
  3158. return this.hashValueField;
  3159. }
  3160. set
  3161. {
  3162. this.hashValueField = value;
  3163. }
  3164. }
  3165. [System.Xml.Serialization.XmlElementAttribute(Order = 4)]
  3166. public DocumentTypeFileSignatureList FileSignatureList
  3167. {
  3168. get
  3169. {
  3170. return this.fileSignatureListField;
  3171. }
  3172. set
  3173. {
  3174. this.fileSignatureListField = value;
  3175. }
  3176. }
  3177. private static System.Xml.Serialization.XmlSerializer Serializer
  3178. {
  3179. get
  3180. {
  3181. if ((serializer == null))
  3182. {
  3183. serializer = new System.Xml.Serialization.XmlSerializer(typeof(DocumentType));
  3184. }
  3185. return serializer;
  3186. }
  3187. }
  3188. #region Serialize/Deserialize
  3189. /// <summary>
  3190. /// Serializes current DocumentType object into an XML document
  3191. /// </summary>
  3192. /// <returns>string XML value</returns>
  3193. public virtual string Serialize()
  3194. {
  3195. System.IO.StreamReader streamReader = null;
  3196. System.IO.MemoryStream memoryStream = null;
  3197. try
  3198. {
  3199. memoryStream = new System.IO.MemoryStream();
  3200. Serializer.Serialize(memoryStream, this);
  3201. memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
  3202. streamReader = new System.IO.StreamReader(memoryStream);
  3203. return streamReader.ReadToEnd();
  3204. }
  3205. finally
  3206. {
  3207. if ((streamReader != null))
  3208. {
  3209. streamReader.Dispose();
  3210. }
  3211. if ((memoryStream != null))
  3212. {
  3213. memoryStream.Dispose();
  3214. }
  3215. }
  3216. }
  3217. /// <summary>
  3218. /// Deserializes workflow markup into an DocumentType object
  3219. /// </summary>
  3220. /// <param name="xml">string workflow markup to deserialize</param>
  3221. /// <param name="obj">Output DocumentType object</param>
  3222. /// <param name="exception">output Exception value if deserialize failed</param>
  3223. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  3224. public static bool Deserialize(string xml, out DocumentType obj, out System.Exception exception)
  3225. {
  3226. exception = null;
  3227. obj = default(DocumentType);
  3228. try
  3229. {
  3230. obj = Deserialize(xml);
  3231. return true;
  3232. }
  3233. catch (System.Exception ex)
  3234. {
  3235. exception = ex;
  3236. return false;
  3237. }
  3238. }
  3239. public static bool Deserialize(string xml, out DocumentType obj)
  3240. {
  3241. System.Exception exception = null;
  3242. return Deserialize(xml, out obj, out exception);
  3243. }
  3244. public static DocumentType Deserialize(string xml)
  3245. {
  3246. System.IO.StringReader stringReader = null;
  3247. try
  3248. {
  3249. stringReader = new System.IO.StringReader(xml);
  3250. return ((DocumentType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
  3251. }
  3252. finally
  3253. {
  3254. if ((stringReader != null))
  3255. {
  3256. stringReader.Dispose();
  3257. }
  3258. }
  3259. }
  3260. /// <summary>
  3261. /// Serializes current DocumentType object into file
  3262. /// </summary>
  3263. /// <param name="fileName">full path of outupt xml file</param>
  3264. /// <param name="exception">output Exception value if failed</param>
  3265. /// <returns>true if can serialize and save into file; otherwise, false</returns>
  3266. public virtual bool SaveToFile(string fileName, out System.Exception exception)
  3267. {
  3268. exception = null;
  3269. try
  3270. {
  3271. SaveToFile(fileName);
  3272. return true;
  3273. }
  3274. catch (System.Exception e)
  3275. {
  3276. exception = e;
  3277. return false;
  3278. }
  3279. }
  3280. public virtual void SaveToFile(string fileName)
  3281. {
  3282. System.IO.StreamWriter streamWriter = null;
  3283. try
  3284. {
  3285. string xmlString = Serialize();
  3286. System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
  3287. streamWriter = xmlFile.CreateText();
  3288. streamWriter.WriteLine(xmlString);
  3289. streamWriter.Close();
  3290. }
  3291. finally
  3292. {
  3293. if ((streamWriter != null))
  3294. {
  3295. streamWriter.Dispose();
  3296. }
  3297. }
  3298. }
  3299. /// <summary>
  3300. /// Deserializes xml markup from file into an DocumentType object
  3301. /// </summary>
  3302. /// <param name="fileName">string xml file to load and deserialize</param>
  3303. /// <param name="obj">Output DocumentType object</param>
  3304. /// <param name="exception">output Exception value if deserialize failed</param>
  3305. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  3306. public static bool LoadFromFile(string fileName, out DocumentType obj, out System.Exception exception)
  3307. {
  3308. exception = null;
  3309. obj = default(DocumentType);
  3310. try
  3311. {
  3312. obj = LoadFromFile(fileName);
  3313. return true;
  3314. }
  3315. catch (System.Exception ex)
  3316. {
  3317. exception = ex;
  3318. return false;
  3319. }
  3320. }
  3321. public static bool LoadFromFile(string fileName, out DocumentType obj)
  3322. {
  3323. System.Exception exception = null;
  3324. return LoadFromFile(fileName, out obj, out exception);
  3325. }
  3326. public static DocumentType LoadFromFile(string fileName)
  3327. {
  3328. System.IO.FileStream file = null;
  3329. System.IO.StreamReader sr = null;
  3330. try
  3331. {
  3332. file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
  3333. sr = new System.IO.StreamReader(file);
  3334. string xmlString = sr.ReadToEnd();
  3335. sr.Close();
  3336. file.Close();
  3337. return Deserialize(xmlString);
  3338. }
  3339. finally
  3340. {
  3341. if ((file != null))
  3342. {
  3343. file.Dispose();
  3344. }
  3345. if ((sr != null))
  3346. {
  3347. sr.Dispose();
  3348. }
  3349. }
  3350. }
  3351. #endregion
  3352. }
  3353. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
  3354. [System.SerializableAttribute()]
  3355. [System.ComponentModel.DesignerCategoryAttribute("code")]
  3356. [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://e-dokumenty.mf.gov.pl")]
  3357. public partial class DocumentTypeFormCode
  3358. {
  3359. private string systemCodeField;
  3360. private string schemaVersionField;
  3361. private string valueField;
  3362. private static System.Xml.Serialization.XmlSerializer serializer;
  3363. [System.Xml.Serialization.XmlAttributeAttribute()]
  3364. public string systemCode
  3365. {
  3366. get
  3367. {
  3368. return this.systemCodeField;
  3369. }
  3370. set
  3371. {
  3372. this.systemCodeField = value;
  3373. }
  3374. }
  3375. [System.Xml.Serialization.XmlAttributeAttribute()]
  3376. public string schemaVersion
  3377. {
  3378. get
  3379. {
  3380. return this.schemaVersionField;
  3381. }
  3382. set
  3383. {
  3384. this.schemaVersionField = value;
  3385. }
  3386. }
  3387. [System.Xml.Serialization.XmlTextAttribute()]
  3388. public string Value
  3389. {
  3390. get
  3391. {
  3392. return this.valueField;
  3393. }
  3394. set
  3395. {
  3396. this.valueField = value;
  3397. }
  3398. }
  3399. private static System.Xml.Serialization.XmlSerializer Serializer
  3400. {
  3401. get
  3402. {
  3403. if ((serializer == null))
  3404. {
  3405. serializer = new System.Xml.Serialization.XmlSerializer(typeof(DocumentTypeFormCode));
  3406. }
  3407. return serializer;
  3408. }
  3409. }
  3410. #region Serialize/Deserialize
  3411. /// <summary>
  3412. /// Serializes current DocumentTypeFormCode object into an XML document
  3413. /// </summary>
  3414. /// <returns>string XML value</returns>
  3415. public virtual string Serialize()
  3416. {
  3417. System.IO.StreamReader streamReader = null;
  3418. System.IO.MemoryStream memoryStream = null;
  3419. try
  3420. {
  3421. memoryStream = new System.IO.MemoryStream();
  3422. Serializer.Serialize(memoryStream, this);
  3423. memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
  3424. streamReader = new System.IO.StreamReader(memoryStream);
  3425. return streamReader.ReadToEnd();
  3426. }
  3427. finally
  3428. {
  3429. if ((streamReader != null))
  3430. {
  3431. streamReader.Dispose();
  3432. }
  3433. if ((memoryStream != null))
  3434. {
  3435. memoryStream.Dispose();
  3436. }
  3437. }
  3438. }
  3439. /// <summary>
  3440. /// Deserializes workflow markup into an DocumentTypeFormCode object
  3441. /// </summary>
  3442. /// <param name="xml">string workflow markup to deserialize</param>
  3443. /// <param name="obj">Output DocumentTypeFormCode object</param>
  3444. /// <param name="exception">output Exception value if deserialize failed</param>
  3445. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  3446. public static bool Deserialize(string xml, out DocumentTypeFormCode obj, out System.Exception exception)
  3447. {
  3448. exception = null;
  3449. obj = default(DocumentTypeFormCode);
  3450. try
  3451. {
  3452. obj = Deserialize(xml);
  3453. return true;
  3454. }
  3455. catch (System.Exception ex)
  3456. {
  3457. exception = ex;
  3458. return false;
  3459. }
  3460. }
  3461. public static bool Deserialize(string xml, out DocumentTypeFormCode obj)
  3462. {
  3463. System.Exception exception = null;
  3464. return Deserialize(xml, out obj, out exception);
  3465. }
  3466. public static DocumentTypeFormCode Deserialize(string xml)
  3467. {
  3468. System.IO.StringReader stringReader = null;
  3469. try
  3470. {
  3471. stringReader = new System.IO.StringReader(xml);
  3472. return ((DocumentTypeFormCode)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
  3473. }
  3474. finally
  3475. {
  3476. if ((stringReader != null))
  3477. {
  3478. stringReader.Dispose();
  3479. }
  3480. }
  3481. }
  3482. /// <summary>
  3483. /// Serializes current DocumentTypeFormCode object into file
  3484. /// </summary>
  3485. /// <param name="fileName">full path of outupt xml file</param>
  3486. /// <param name="exception">output Exception value if failed</param>
  3487. /// <returns>true if can serialize and save into file; otherwise, false</returns>
  3488. public virtual bool SaveToFile(string fileName, out System.Exception exception)
  3489. {
  3490. exception = null;
  3491. try
  3492. {
  3493. SaveToFile(fileName);
  3494. return true;
  3495. }
  3496. catch (System.Exception e)
  3497. {
  3498. exception = e;
  3499. return false;
  3500. }
  3501. }
  3502. public virtual void SaveToFile(string fileName)
  3503. {
  3504. System.IO.StreamWriter streamWriter = null;
  3505. try
  3506. {
  3507. string xmlString = Serialize();
  3508. System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
  3509. streamWriter = xmlFile.CreateText();
  3510. streamWriter.WriteLine(xmlString);
  3511. streamWriter.Close();
  3512. }
  3513. finally
  3514. {
  3515. if ((streamWriter != null))
  3516. {
  3517. streamWriter.Dispose();
  3518. }
  3519. }
  3520. }
  3521. /// <summary>
  3522. /// Deserializes xml markup from file into an DocumentTypeFormCode object
  3523. /// </summary>
  3524. /// <param name="fileName">string xml file to load and deserialize</param>
  3525. /// <param name="obj">Output DocumentTypeFormCode object</param>
  3526. /// <param name="exception">output Exception value if deserialize failed</param>
  3527. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  3528. public static bool LoadFromFile(string fileName, out DocumentTypeFormCode obj, out System.Exception exception)
  3529. {
  3530. exception = null;
  3531. obj = default(DocumentTypeFormCode);
  3532. try
  3533. {
  3534. obj = LoadFromFile(fileName);
  3535. return true;
  3536. }
  3537. catch (System.Exception ex)
  3538. {
  3539. exception = ex;
  3540. return false;
  3541. }
  3542. }
  3543. public static bool LoadFromFile(string fileName, out DocumentTypeFormCode obj)
  3544. {
  3545. System.Exception exception = null;
  3546. return LoadFromFile(fileName, out obj, out exception);
  3547. }
  3548. public static DocumentTypeFormCode LoadFromFile(string fileName)
  3549. {
  3550. System.IO.FileStream file = null;
  3551. System.IO.StreamReader sr = null;
  3552. try
  3553. {
  3554. file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
  3555. sr = new System.IO.StreamReader(file);
  3556. string xmlString = sr.ReadToEnd();
  3557. sr.Close();
  3558. file.Close();
  3559. return Deserialize(xmlString);
  3560. }
  3561. finally
  3562. {
  3563. if ((file != null))
  3564. {
  3565. file.Dispose();
  3566. }
  3567. if ((sr != null))
  3568. {
  3569. sr.Dispose();
  3570. }
  3571. }
  3572. }
  3573. #endregion
  3574. }
  3575. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
  3576. [System.SerializableAttribute()]
  3577. [System.ComponentModel.DesignerCategoryAttribute("code")]
  3578. [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://e-dokumenty.mf.gov.pl")]
  3579. public partial class DocumentTypeHashValue : HashValueSHAType
  3580. {
  3581. private static System.Xml.Serialization.XmlSerializer serializer;
  3582. private static System.Xml.Serialization.XmlSerializer Serializer
  3583. {
  3584. get
  3585. {
  3586. if ((serializer == null))
  3587. {
  3588. serializer = new System.Xml.Serialization.XmlSerializer(typeof(DocumentTypeHashValue));
  3589. }
  3590. return serializer;
  3591. }
  3592. }
  3593. #region Serialize/Deserialize
  3594. /// <summary>
  3595. /// Serializes current DocumentTypeHashValue object into an XML document
  3596. /// </summary>
  3597. /// <returns>string XML value</returns>
  3598. public virtual string Serialize()
  3599. {
  3600. System.IO.StreamReader streamReader = null;
  3601. System.IO.MemoryStream memoryStream = null;
  3602. try
  3603. {
  3604. memoryStream = new System.IO.MemoryStream();
  3605. Serializer.Serialize(memoryStream, this);
  3606. memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
  3607. streamReader = new System.IO.StreamReader(memoryStream);
  3608. return streamReader.ReadToEnd();
  3609. }
  3610. finally
  3611. {
  3612. if ((streamReader != null))
  3613. {
  3614. streamReader.Dispose();
  3615. }
  3616. if ((memoryStream != null))
  3617. {
  3618. memoryStream.Dispose();
  3619. }
  3620. }
  3621. }
  3622. /// <summary>
  3623. /// Deserializes workflow markup into an DocumentTypeHashValue object
  3624. /// </summary>
  3625. /// <param name="xml">string workflow markup to deserialize</param>
  3626. /// <param name="obj">Output DocumentTypeHashValue object</param>
  3627. /// <param name="exception">output Exception value if deserialize failed</param>
  3628. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  3629. public static bool Deserialize(string xml, out DocumentTypeHashValue obj, out System.Exception exception)
  3630. {
  3631. exception = null;
  3632. obj = default(DocumentTypeHashValue);
  3633. try
  3634. {
  3635. obj = Deserialize(xml);
  3636. return true;
  3637. }
  3638. catch (System.Exception ex)
  3639. {
  3640. exception = ex;
  3641. return false;
  3642. }
  3643. }
  3644. public static bool Deserialize(string xml, out DocumentTypeHashValue obj)
  3645. {
  3646. System.Exception exception = null;
  3647. return Deserialize(xml, out obj, out exception);
  3648. }
  3649. public static DocumentTypeHashValue Deserialize(string xml)
  3650. {
  3651. System.IO.StringReader stringReader = null;
  3652. try
  3653. {
  3654. stringReader = new System.IO.StringReader(xml);
  3655. return ((DocumentTypeHashValue)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
  3656. }
  3657. finally
  3658. {
  3659. if ((stringReader != null))
  3660. {
  3661. stringReader.Dispose();
  3662. }
  3663. }
  3664. }
  3665. /// <summary>
  3666. /// Serializes current DocumentTypeHashValue object into file
  3667. /// </summary>
  3668. /// <param name="fileName">full path of outupt xml file</param>
  3669. /// <param name="exception">output Exception value if failed</param>
  3670. /// <returns>true if can serialize and save into file; otherwise, false</returns>
  3671. public virtual bool SaveToFile(string fileName, out System.Exception exception)
  3672. {
  3673. exception = null;
  3674. try
  3675. {
  3676. SaveToFile(fileName);
  3677. return true;
  3678. }
  3679. catch (System.Exception e)
  3680. {
  3681. exception = e;
  3682. return false;
  3683. }
  3684. }
  3685. public virtual void SaveToFile(string fileName)
  3686. {
  3687. System.IO.StreamWriter streamWriter = null;
  3688. try
  3689. {
  3690. string xmlString = Serialize();
  3691. System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
  3692. streamWriter = xmlFile.CreateText();
  3693. streamWriter.WriteLine(xmlString);
  3694. streamWriter.Close();
  3695. }
  3696. finally
  3697. {
  3698. if ((streamWriter != null))
  3699. {
  3700. streamWriter.Dispose();
  3701. }
  3702. }
  3703. }
  3704. /// <summary>
  3705. /// Deserializes xml markup from file into an DocumentTypeHashValue object
  3706. /// </summary>
  3707. /// <param name="fileName">string xml file to load and deserialize</param>
  3708. /// <param name="obj">Output DocumentTypeHashValue object</param>
  3709. /// <param name="exception">output Exception value if deserialize failed</param>
  3710. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  3711. public static bool LoadFromFile(string fileName, out DocumentTypeHashValue obj, out System.Exception exception)
  3712. {
  3713. exception = null;
  3714. obj = default(DocumentTypeHashValue);
  3715. try
  3716. {
  3717. obj = LoadFromFile(fileName);
  3718. return true;
  3719. }
  3720. catch (System.Exception ex)
  3721. {
  3722. exception = ex;
  3723. return false;
  3724. }
  3725. }
  3726. public static bool LoadFromFile(string fileName, out DocumentTypeHashValue obj)
  3727. {
  3728. System.Exception exception = null;
  3729. return LoadFromFile(fileName, out obj, out exception);
  3730. }
  3731. public static DocumentTypeHashValue LoadFromFile(string fileName)
  3732. {
  3733. System.IO.FileStream file = null;
  3734. System.IO.StreamReader sr = null;
  3735. try
  3736. {
  3737. file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
  3738. sr = new System.IO.StreamReader(file);
  3739. string xmlString = sr.ReadToEnd();
  3740. sr.Close();
  3741. file.Close();
  3742. return Deserialize(xmlString);
  3743. }
  3744. finally
  3745. {
  3746. if ((file != null))
  3747. {
  3748. file.Dispose();
  3749. }
  3750. if ((sr != null))
  3751. {
  3752. sr.Dispose();
  3753. }
  3754. }
  3755. }
  3756. #endregion
  3757. }
  3758. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
  3759. [System.SerializableAttribute()]
  3760. [System.ComponentModel.DesignerCategoryAttribute("code")]
  3761. [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://e-dokumenty.mf.gov.pl")]
  3762. public partial class DocumentTypeFileSignatureList : ArrayOfFileSignatureType
  3763. {
  3764. private int filesNumberField;
  3765. private static System.Xml.Serialization.XmlSerializer serializer;
  3766. [System.Xml.Serialization.XmlAttributeAttribute()]
  3767. public int filesNumber
  3768. {
  3769. get
  3770. {
  3771. return this.filesNumberField;
  3772. }
  3773. set
  3774. {
  3775. this.filesNumberField = value;
  3776. }
  3777. }
  3778. private static System.Xml.Serialization.XmlSerializer Serializer
  3779. {
  3780. get
  3781. {
  3782. if ((serializer == null))
  3783. {
  3784. serializer = new System.Xml.Serialization.XmlSerializer(typeof(DocumentTypeFileSignatureList));
  3785. }
  3786. return serializer;
  3787. }
  3788. }
  3789. #region Serialize/Deserialize
  3790. /// <summary>
  3791. /// Serializes current DocumentTypeFileSignatureList object into an XML document
  3792. /// </summary>
  3793. /// <returns>string XML value</returns>
  3794. public virtual string Serialize()
  3795. {
  3796. System.IO.StreamReader streamReader = null;
  3797. System.IO.MemoryStream memoryStream = null;
  3798. try
  3799. {
  3800. memoryStream = new System.IO.MemoryStream();
  3801. Serializer.Serialize(memoryStream, this);
  3802. memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
  3803. streamReader = new System.IO.StreamReader(memoryStream);
  3804. return streamReader.ReadToEnd();
  3805. }
  3806. finally
  3807. {
  3808. if ((streamReader != null))
  3809. {
  3810. streamReader.Dispose();
  3811. }
  3812. if ((memoryStream != null))
  3813. {
  3814. memoryStream.Dispose();
  3815. }
  3816. }
  3817. }
  3818. /// <summary>
  3819. /// Deserializes workflow markup into an DocumentTypeFileSignatureList object
  3820. /// </summary>
  3821. /// <param name="xml">string workflow markup to deserialize</param>
  3822. /// <param name="obj">Output DocumentTypeFileSignatureList object</param>
  3823. /// <param name="exception">output Exception value if deserialize failed</param>
  3824. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  3825. public static bool Deserialize(string xml, out DocumentTypeFileSignatureList obj, out System.Exception exception)
  3826. {
  3827. exception = null;
  3828. obj = default(DocumentTypeFileSignatureList);
  3829. try
  3830. {
  3831. obj = Deserialize(xml);
  3832. return true;
  3833. }
  3834. catch (System.Exception ex)
  3835. {
  3836. exception = ex;
  3837. return false;
  3838. }
  3839. }
  3840. public static bool Deserialize(string xml, out DocumentTypeFileSignatureList obj)
  3841. {
  3842. System.Exception exception = null;
  3843. return Deserialize(xml, out obj, out exception);
  3844. }
  3845. public static DocumentTypeFileSignatureList Deserialize(string xml)
  3846. {
  3847. System.IO.StringReader stringReader = null;
  3848. try
  3849. {
  3850. stringReader = new System.IO.StringReader(xml);
  3851. return ((DocumentTypeFileSignatureList)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
  3852. }
  3853. finally
  3854. {
  3855. if ((stringReader != null))
  3856. {
  3857. stringReader.Dispose();
  3858. }
  3859. }
  3860. }
  3861. /// <summary>
  3862. /// Serializes current DocumentTypeFileSignatureList object into file
  3863. /// </summary>
  3864. /// <param name="fileName">full path of outupt xml file</param>
  3865. /// <param name="exception">output Exception value if failed</param>
  3866. /// <returns>true if can serialize and save into file; otherwise, false</returns>
  3867. public virtual bool SaveToFile(string fileName, out System.Exception exception)
  3868. {
  3869. exception = null;
  3870. try
  3871. {
  3872. SaveToFile(fileName);
  3873. return true;
  3874. }
  3875. catch (System.Exception e)
  3876. {
  3877. exception = e;
  3878. return false;
  3879. }
  3880. }
  3881. public virtual void SaveToFile(string fileName)
  3882. {
  3883. System.IO.StreamWriter streamWriter = null;
  3884. try
  3885. {
  3886. string xmlString = Serialize();
  3887. System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
  3888. streamWriter = xmlFile.CreateText();
  3889. streamWriter.WriteLine(xmlString);
  3890. streamWriter.Close();
  3891. }
  3892. finally
  3893. {
  3894. if ((streamWriter != null))
  3895. {
  3896. streamWriter.Dispose();
  3897. }
  3898. }
  3899. }
  3900. /// <summary>
  3901. /// Deserializes xml markup from file into an DocumentTypeFileSignatureList object
  3902. /// </summary>
  3903. /// <param name="fileName">string xml file to load and deserialize</param>
  3904. /// <param name="obj">Output DocumentTypeFileSignatureList object</param>
  3905. /// <param name="exception">output Exception value if deserialize failed</param>
  3906. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  3907. public static bool LoadFromFile(string fileName, out DocumentTypeFileSignatureList obj, out System.Exception exception)
  3908. {
  3909. exception = null;
  3910. obj = default(DocumentTypeFileSignatureList);
  3911. try
  3912. {
  3913. obj = LoadFromFile(fileName);
  3914. return true;
  3915. }
  3916. catch (System.Exception ex)
  3917. {
  3918. exception = ex;
  3919. return false;
  3920. }
  3921. }
  3922. public static bool LoadFromFile(string fileName, out DocumentTypeFileSignatureList obj)
  3923. {
  3924. System.Exception exception = null;
  3925. return LoadFromFile(fileName, out obj, out exception);
  3926. }
  3927. public static DocumentTypeFileSignatureList LoadFromFile(string fileName)
  3928. {
  3929. System.IO.FileStream file = null;
  3930. System.IO.StreamReader sr = null;
  3931. try
  3932. {
  3933. file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
  3934. sr = new System.IO.StreamReader(file);
  3935. string xmlString = sr.ReadToEnd();
  3936. sr.Close();
  3937. file.Close();
  3938. return Deserialize(xmlString);
  3939. }
  3940. finally
  3941. {
  3942. if ((file != null))
  3943. {
  3944. file.Dispose();
  3945. }
  3946. if ((sr != null))
  3947. {
  3948. sr.Dispose();
  3949. }
  3950. }
  3951. }
  3952. #endregion
  3953. }
  3954. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
  3955. [System.SerializableAttribute()]
  3956. [System.ComponentModel.DesignerCategoryAttribute("code")]
  3957. [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://e-dokumenty.mf.gov.pl")]
  3958. [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://e-dokumenty.mf.gov.pl", IsNullable = true)]
  3959. public partial class ArrayOfDocumentType
  3960. {
  3961. private ArrayOfDocumentTypeDocument documentField;
  3962. private static System.Xml.Serialization.XmlSerializer serializer;
  3963. public ArrayOfDocumentType()
  3964. {
  3965. this.documentField = new ArrayOfDocumentTypeDocument();
  3966. }
  3967. [System.Xml.Serialization.XmlElementAttribute(Order = 0)]
  3968. public ArrayOfDocumentTypeDocument Document
  3969. {
  3970. get
  3971. {
  3972. return this.documentField;
  3973. }
  3974. set
  3975. {
  3976. this.documentField = value;
  3977. }
  3978. }
  3979. private static System.Xml.Serialization.XmlSerializer Serializer
  3980. {
  3981. get
  3982. {
  3983. if ((serializer == null))
  3984. {
  3985. serializer = new System.Xml.Serialization.XmlSerializer(typeof(ArrayOfDocumentType));
  3986. }
  3987. return serializer;
  3988. }
  3989. }
  3990. #region Serialize/Deserialize
  3991. /// <summary>
  3992. /// Serializes current ArrayOfDocumentType object into an XML document
  3993. /// </summary>
  3994. /// <returns>string XML value</returns>
  3995. public virtual string Serialize()
  3996. {
  3997. System.IO.StreamReader streamReader = null;
  3998. System.IO.MemoryStream memoryStream = null;
  3999. try
  4000. {
  4001. memoryStream = new System.IO.MemoryStream();
  4002. Serializer.Serialize(memoryStream, this);
  4003. memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
  4004. streamReader = new System.IO.StreamReader(memoryStream);
  4005. return streamReader.ReadToEnd();
  4006. }
  4007. finally
  4008. {
  4009. if ((streamReader != null))
  4010. {
  4011. streamReader.Dispose();
  4012. }
  4013. if ((memoryStream != null))
  4014. {
  4015. memoryStream.Dispose();
  4016. }
  4017. }
  4018. }
  4019. /// <summary>
  4020. /// Deserializes workflow markup into an ArrayOfDocumentType object
  4021. /// </summary>
  4022. /// <param name="xml">string workflow markup to deserialize</param>
  4023. /// <param name="obj">Output ArrayOfDocumentType object</param>
  4024. /// <param name="exception">output Exception value if deserialize failed</param>
  4025. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  4026. public static bool Deserialize(string xml, out ArrayOfDocumentType obj, out System.Exception exception)
  4027. {
  4028. exception = null;
  4029. obj = default(ArrayOfDocumentType);
  4030. try
  4031. {
  4032. obj = Deserialize(xml);
  4033. return true;
  4034. }
  4035. catch (System.Exception ex)
  4036. {
  4037. exception = ex;
  4038. return false;
  4039. }
  4040. }
  4041. public static bool Deserialize(string xml, out ArrayOfDocumentType obj)
  4042. {
  4043. System.Exception exception = null;
  4044. return Deserialize(xml, out obj, out exception);
  4045. }
  4046. public static ArrayOfDocumentType Deserialize(string xml)
  4047. {
  4048. System.IO.StringReader stringReader = null;
  4049. try
  4050. {
  4051. stringReader = new System.IO.StringReader(xml);
  4052. return ((ArrayOfDocumentType)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
  4053. }
  4054. finally
  4055. {
  4056. if ((stringReader != null))
  4057. {
  4058. stringReader.Dispose();
  4059. }
  4060. }
  4061. }
  4062. /// <summary>
  4063. /// Serializes current ArrayOfDocumentType object into file
  4064. /// </summary>
  4065. /// <param name="fileName">full path of outupt xml file</param>
  4066. /// <param name="exception">output Exception value if failed</param>
  4067. /// <returns>true if can serialize and save into file; otherwise, false</returns>
  4068. public virtual bool SaveToFile(string fileName, out System.Exception exception)
  4069. {
  4070. exception = null;
  4071. try
  4072. {
  4073. SaveToFile(fileName);
  4074. return true;
  4075. }
  4076. catch (System.Exception e)
  4077. {
  4078. exception = e;
  4079. return false;
  4080. }
  4081. }
  4082. public virtual void SaveToFile(string fileName)
  4083. {
  4084. System.IO.StreamWriter streamWriter = null;
  4085. try
  4086. {
  4087. string xmlString = Serialize();
  4088. System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
  4089. streamWriter = xmlFile.CreateText();
  4090. streamWriter.WriteLine(xmlString);
  4091. streamWriter.Close();
  4092. }
  4093. finally
  4094. {
  4095. if ((streamWriter != null))
  4096. {
  4097. streamWriter.Dispose();
  4098. }
  4099. }
  4100. }
  4101. /// <summary>
  4102. /// Deserializes xml markup from file into an ArrayOfDocumentType object
  4103. /// </summary>
  4104. /// <param name="fileName">string xml file to load and deserialize</param>
  4105. /// <param name="obj">Output ArrayOfDocumentType object</param>
  4106. /// <param name="exception">output Exception value if deserialize failed</param>
  4107. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  4108. public static bool LoadFromFile(string fileName, out ArrayOfDocumentType obj, out System.Exception exception)
  4109. {
  4110. exception = null;
  4111. obj = default(ArrayOfDocumentType);
  4112. try
  4113. {
  4114. obj = LoadFromFile(fileName);
  4115. return true;
  4116. }
  4117. catch (System.Exception ex)
  4118. {
  4119. exception = ex;
  4120. return false;
  4121. }
  4122. }
  4123. public static bool LoadFromFile(string fileName, out ArrayOfDocumentType obj)
  4124. {
  4125. System.Exception exception = null;
  4126. return LoadFromFile(fileName, out obj, out exception);
  4127. }
  4128. public static ArrayOfDocumentType LoadFromFile(string fileName)
  4129. {
  4130. System.IO.FileStream file = null;
  4131. System.IO.StreamReader sr = null;
  4132. try
  4133. {
  4134. file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
  4135. sr = new System.IO.StreamReader(file);
  4136. string xmlString = sr.ReadToEnd();
  4137. sr.Close();
  4138. file.Close();
  4139. return Deserialize(xmlString);
  4140. }
  4141. finally
  4142. {
  4143. if ((file != null))
  4144. {
  4145. file.Dispose();
  4146. }
  4147. if ((sr != null))
  4148. {
  4149. sr.Dispose();
  4150. }
  4151. }
  4152. }
  4153. #endregion
  4154. }
  4155. [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.34234")]
  4156. [System.SerializableAttribute()]
  4157. [System.ComponentModel.DesignerCategoryAttribute("code")]
  4158. [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://e-dokumenty.mf.gov.pl")]
  4159. public partial class ArrayOfDocumentTypeDocument : DocumentType
  4160. {
  4161. private static System.Xml.Serialization.XmlSerializer serializer;
  4162. private static System.Xml.Serialization.XmlSerializer Serializer
  4163. {
  4164. get
  4165. {
  4166. if ((serializer == null))
  4167. {
  4168. serializer = new System.Xml.Serialization.XmlSerializer(typeof(ArrayOfDocumentTypeDocument));
  4169. }
  4170. return serializer;
  4171. }
  4172. }
  4173. #region Serialize/Deserialize
  4174. /// <summary>
  4175. /// Serializes current ArrayOfDocumentTypeDocument object into an XML document
  4176. /// </summary>
  4177. /// <returns>string XML value</returns>
  4178. public virtual string Serialize()
  4179. {
  4180. System.IO.StreamReader streamReader = null;
  4181. System.IO.MemoryStream memoryStream = null;
  4182. try
  4183. {
  4184. memoryStream = new System.IO.MemoryStream();
  4185. Serializer.Serialize(memoryStream, this);
  4186. memoryStream.Seek(0, System.IO.SeekOrigin.Begin);
  4187. streamReader = new System.IO.StreamReader(memoryStream);
  4188. return streamReader.ReadToEnd();
  4189. }
  4190. finally
  4191. {
  4192. if ((streamReader != null))
  4193. {
  4194. streamReader.Dispose();
  4195. }
  4196. if ((memoryStream != null))
  4197. {
  4198. memoryStream.Dispose();
  4199. }
  4200. }
  4201. }
  4202. /// <summary>
  4203. /// Deserializes workflow markup into an ArrayOfDocumentTypeDocument object
  4204. /// </summary>
  4205. /// <param name="xml">string workflow markup to deserialize</param>
  4206. /// <param name="obj">Output ArrayOfDocumentTypeDocument object</param>
  4207. /// <param name="exception">output Exception value if deserialize failed</param>
  4208. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  4209. public static bool Deserialize(string xml, out ArrayOfDocumentTypeDocument obj, out System.Exception exception)
  4210. {
  4211. exception = null;
  4212. obj = default(ArrayOfDocumentTypeDocument);
  4213. try
  4214. {
  4215. obj = Deserialize(xml);
  4216. return true;
  4217. }
  4218. catch (System.Exception ex)
  4219. {
  4220. exception = ex;
  4221. return false;
  4222. }
  4223. }
  4224. public static bool Deserialize(string xml, out ArrayOfDocumentTypeDocument obj)
  4225. {
  4226. System.Exception exception = null;
  4227. return Deserialize(xml, out obj, out exception);
  4228. }
  4229. public static ArrayOfDocumentTypeDocument Deserialize(string xml)
  4230. {
  4231. System.IO.StringReader stringReader = null;
  4232. try
  4233. {
  4234. stringReader = new System.IO.StringReader(xml);
  4235. return ((ArrayOfDocumentTypeDocument)(Serializer.Deserialize(System.Xml.XmlReader.Create(stringReader))));
  4236. }
  4237. finally
  4238. {
  4239. if ((stringReader != null))
  4240. {
  4241. stringReader.Dispose();
  4242. }
  4243. }
  4244. }
  4245. /// <summary>
  4246. /// Serializes current ArrayOfDocumentTypeDocument object into file
  4247. /// </summary>
  4248. /// <param name="fileName">full path of outupt xml file</param>
  4249. /// <param name="exception">output Exception value if failed</param>
  4250. /// <returns>true if can serialize and save into file; otherwise, false</returns>
  4251. public virtual bool SaveToFile(string fileName, out System.Exception exception)
  4252. {
  4253. exception = null;
  4254. try
  4255. {
  4256. SaveToFile(fileName);
  4257. return true;
  4258. }
  4259. catch (System.Exception e)
  4260. {
  4261. exception = e;
  4262. return false;
  4263. }
  4264. }
  4265. public virtual void SaveToFile(string fileName)
  4266. {
  4267. System.IO.StreamWriter streamWriter = null;
  4268. try
  4269. {
  4270. string xmlString = Serialize();
  4271. System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
  4272. streamWriter = xmlFile.CreateText();
  4273. streamWriter.WriteLine(xmlString);
  4274. streamWriter.Close();
  4275. }
  4276. finally
  4277. {
  4278. if ((streamWriter != null))
  4279. {
  4280. streamWriter.Dispose();
  4281. }
  4282. }
  4283. }
  4284. /// <summary>
  4285. /// Deserializes xml markup from file into an ArrayOfDocumentTypeDocument object
  4286. /// </summary>
  4287. /// <param name="fileName">string xml file to load and deserialize</param>
  4288. /// <param name="obj">Output ArrayOfDocumentTypeDocument object</param>
  4289. /// <param name="exception">output Exception value if deserialize failed</param>
  4290. /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
  4291. public static bool LoadFromFile(string fileName, out ArrayOfDocumentTypeDocument obj, out System.Exception exception)
  4292. {
  4293. exception = null;
  4294. obj = default(ArrayOfDocumentTypeDocument);
  4295. try
  4296. {
  4297. obj = LoadFromFile(fileName);
  4298. return true;
  4299. }
  4300. catch (System.Exception ex)
  4301. {
  4302. exception = ex;
  4303. return false;
  4304. }
  4305. }
  4306. public static bool LoadFromFile(string fileName, out ArrayOfDocumentTypeDocument obj)
  4307. {
  4308. System.Exception exception = null;
  4309. return LoadFromFile(fileName, out obj, out exception);
  4310. }
  4311. public static ArrayOfDocumentTypeDocument LoadFromFile(string fileName)
  4312. {
  4313. System.IO.FileStream file = null;
  4314. System.IO.StreamReader sr = null;
  4315. try
  4316. {
  4317. file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
  4318. sr = new System.IO.StreamReader(file);
  4319. string xmlString = sr.ReadToEnd();
  4320. sr.Close();
  4321. file.Close();
  4322. return Deserialize(xmlString);
  4323. }
  4324. finally
  4325. {
  4326. if ((file != null))
  4327. {
  4328. file.Dispose();
  4329. }
  4330. if ((sr != null))
  4331. {
  4332. sr.Dispose();
  4333. }
  4334. }
  4335. }
  4336. #endregion
  4337. }
  4338. }