ServiceDescriptionSerializerBase.cs 443 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094
  1. //
  2. // Permission is hereby granted, free of charge, to any person obtaining
  3. // a copy of this software and associated documentation files (the
  4. // "Software"), to deal in the Software without restriction, including
  5. // without limitation the rights to use, copy, modify, merge, publish,
  6. // distribute, sublicense, and/or sell copies of the Software, and to
  7. // permit persons to whom the Software is furnished to do so, subject to
  8. // the following conditions:
  9. //
  10. // The above copyright notice and this permission notice shall be
  11. // included in all copies or substantial portions of the Software.
  12. //
  13. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  14. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  15. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  16. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  17. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  18. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  19. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  20. //
  21. using System;
  22. using System.Xml;
  23. using System.Xml.Schema;
  24. using System.Xml.Serialization;
  25. using System.Text;
  26. using System.Collections;
  27. using System.Globalization;
  28. namespace System.Web.Services.Description
  29. {
  30. internal class ServiceDescriptionReaderBase : XmlSerializationReader
  31. {
  32. public System.Web.Services.Description.ServiceDescription ReadTree ()
  33. {
  34. Reader.MoveToContent();
  35. if (Reader.LocalName != "definitions" || Reader.NamespaceURI != "http://schemas.xmlsoap.org/wsdl/")
  36. throw CreateUnknownNodeException();
  37. return ReadObject_ServiceDescription (true, true);
  38. }
  39. public System.Web.Services.Description.ServiceDescription ReadObject_ServiceDescription (bool isNullable, bool checkType)
  40. {
  41. System.Web.Services.Description.ServiceDescription ob = null;
  42. if (isNullable && ReadNull()) return null;
  43. if (checkType)
  44. {
  45. System.Xml.XmlQualifiedName t = GetXsiType();
  46. if (t == null)
  47. { }
  48. else if (t.Name != "ServiceDescription" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  49. throw CreateUnknownTypeException(t);
  50. }
  51. ob = new System.Web.Services.Description.ServiceDescription ();
  52. Reader.MoveToElement();
  53. while (Reader.MoveToNextAttribute())
  54. {
  55. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  56. ob.@Name = Reader.Value;
  57. }
  58. else if (Reader.LocalName == "targetNamespace" && Reader.NamespaceURI == "") {
  59. ob.@TargetNamespace = Reader.Value;
  60. }
  61. else if (IsXmlnsAttribute (Reader.Name)) {
  62. }
  63. else {
  64. #if NET_2_0
  65. ServiceDescription.AddUnknownAttribute ((XmlAttribute) ReadXmlNode (false));
  66. #else
  67. UnknownNode (ob);
  68. #endif
  69. }
  70. }
  71. #if NET_2_0
  72. ServiceDescription.SetExtensibleAttributes (ob);
  73. #endif
  74. Reader.MoveToElement();
  75. if (Reader.IsEmptyElement) {
  76. Reader.Skip ();
  77. return ob;
  78. }
  79. Reader.ReadStartElement();
  80. Reader.MoveToContent();
  81. bool b0=false, b1=false, b2=false, b3=false, b4=false, b5=false, b6=false;
  82. System.Web.Services.Description.ImportCollection o8;
  83. o8 = ob.@Imports;
  84. System.Web.Services.Description.MessageCollection o10;
  85. o10 = ob.@Messages;
  86. System.Web.Services.Description.PortTypeCollection o12;
  87. o12 = ob.@PortTypes;
  88. System.Web.Services.Description.BindingCollection o14;
  89. o14 = ob.@Bindings;
  90. System.Web.Services.Description.ServiceCollection o16;
  91. o16 = ob.@Services;
  92. int n7=0, n9=0, n11=0, n13=0, n15=0;
  93. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  94. {
  95. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  96. {
  97. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b0) {
  98. ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
  99. }
  100. else if (Reader.LocalName == "service" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b6) {
  101. if (((object)o16) == null)
  102. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.ServiceCollection");
  103. o16.Add (ReadObject_Service (false, true));
  104. n15++;
  105. }
  106. else if (Reader.LocalName == "message" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b3) {
  107. if (((object)o10) == null)
  108. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.MessageCollection");
  109. o10.Add (ReadObject_Message (false, true));
  110. n9++;
  111. }
  112. else if (Reader.LocalName == "portType" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b4) {
  113. if (((object)o12) == null)
  114. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.PortTypeCollection");
  115. o12.Add (ReadObject_PortType (false, true));
  116. n11++;
  117. }
  118. else if (Reader.LocalName == "import" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b1) {
  119. if (((object)o8) == null)
  120. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.ImportCollection");
  121. o8.Add (ReadObject_Import (false, true));
  122. n7++;
  123. }
  124. else if (Reader.LocalName == "binding" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b5) {
  125. if (((object)o14) == null)
  126. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.BindingCollection");
  127. o14.Add (ReadObject_Binding (false, true));
  128. n13++;
  129. }
  130. else if (Reader.LocalName == "types" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b2) {
  131. b2 = true;
  132. ob.@Types = ReadObject_Types (false, true);
  133. }
  134. else {
  135. ServiceDescription.ReadExtension (Reader, ob);
  136. }
  137. }
  138. else
  139. UnknownNode(ob);
  140. Reader.MoveToContent();
  141. }
  142. ReadEndElement();
  143. return ob;
  144. }
  145. public System.Web.Services.Description.Service ReadObject_Service (bool isNullable, bool checkType)
  146. {
  147. System.Web.Services.Description.Service ob = null;
  148. if (isNullable && ReadNull()) return null;
  149. if (checkType)
  150. {
  151. System.Xml.XmlQualifiedName t = GetXsiType();
  152. if (t == null)
  153. { }
  154. else if (t.Name != "Service" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  155. throw CreateUnknownTypeException(t);
  156. }
  157. ob = new System.Web.Services.Description.Service ();
  158. Reader.MoveToElement();
  159. while (Reader.MoveToNextAttribute())
  160. {
  161. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  162. ob.@Name = Reader.Value;
  163. }
  164. else if (IsXmlnsAttribute (Reader.Name)) {
  165. }
  166. else {
  167. #if NET_2_0
  168. ServiceDescription.AddUnknownAttribute ((XmlAttribute) ReadXmlNode (false));
  169. #else
  170. UnknownNode (ob);
  171. #endif
  172. }
  173. }
  174. #if NET_2_0
  175. ServiceDescription.SetExtensibleAttributes (ob);
  176. #endif
  177. Reader.MoveToElement();
  178. if (Reader.IsEmptyElement) {
  179. Reader.Skip ();
  180. return ob;
  181. }
  182. Reader.ReadStartElement();
  183. Reader.MoveToContent();
  184. bool b17=false, b18=false;
  185. System.Web.Services.Description.PortCollection o20;
  186. o20 = ob.@Ports;
  187. int n19=0;
  188. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  189. {
  190. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  191. {
  192. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b17) {
  193. ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
  194. }
  195. else if (Reader.LocalName == "port" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b18) {
  196. if (((object)o20) == null)
  197. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.PortCollection");
  198. o20.Add (ReadObject_Port (false, true));
  199. n19++;
  200. }
  201. else {
  202. UnknownNode (ob);
  203. }
  204. }
  205. else
  206. UnknownNode(ob);
  207. Reader.MoveToContent();
  208. }
  209. ReadEndElement();
  210. return ob;
  211. }
  212. public System.Web.Services.Description.Message ReadObject_Message (bool isNullable, bool checkType)
  213. {
  214. System.Web.Services.Description.Message ob = null;
  215. if (isNullable && ReadNull()) return null;
  216. if (checkType)
  217. {
  218. System.Xml.XmlQualifiedName t = GetXsiType();
  219. if (t == null)
  220. { }
  221. else if (t.Name != "Message" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  222. throw CreateUnknownTypeException(t);
  223. }
  224. ob = new System.Web.Services.Description.Message ();
  225. Reader.MoveToElement();
  226. while (Reader.MoveToNextAttribute())
  227. {
  228. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  229. ob.@Name = Reader.Value;
  230. }
  231. else if (IsXmlnsAttribute (Reader.Name)) {
  232. }
  233. else {
  234. #if NET_2_0
  235. ServiceDescription.AddUnknownAttribute ((XmlAttribute) ReadXmlNode (false));
  236. #else
  237. UnknownNode (ob);
  238. #endif
  239. }
  240. }
  241. #if NET_2_0
  242. ServiceDescription.SetExtensibleAttributes (ob);
  243. #endif
  244. Reader.MoveToElement();
  245. if (Reader.IsEmptyElement) {
  246. Reader.Skip ();
  247. return ob;
  248. }
  249. Reader.ReadStartElement();
  250. Reader.MoveToContent();
  251. bool b21=false, b22=false;
  252. System.Web.Services.Description.MessagePartCollection o24;
  253. o24 = ob.@Parts;
  254. int n23=0;
  255. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  256. {
  257. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  258. {
  259. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b21) {
  260. ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
  261. }
  262. else if (Reader.LocalName == "part" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b22) {
  263. if (((object)o24) == null)
  264. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.MessagePartCollection");
  265. o24.Add (ReadObject_MessagePart (false, true));
  266. n23++;
  267. }
  268. else {
  269. UnknownNode (ob);
  270. }
  271. }
  272. else
  273. UnknownNode(ob);
  274. Reader.MoveToContent();
  275. }
  276. ReadEndElement();
  277. return ob;
  278. }
  279. public System.Web.Services.Description.PortType ReadObject_PortType (bool isNullable, bool checkType)
  280. {
  281. System.Web.Services.Description.PortType ob = null;
  282. if (isNullable && ReadNull()) return null;
  283. if (checkType)
  284. {
  285. System.Xml.XmlQualifiedName t = GetXsiType();
  286. if (t == null)
  287. { }
  288. else if (t.Name != "PortType" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  289. throw CreateUnknownTypeException(t);
  290. }
  291. ob = new System.Web.Services.Description.PortType ();
  292. Reader.MoveToElement();
  293. while (Reader.MoveToNextAttribute())
  294. {
  295. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  296. ob.@Name = Reader.Value;
  297. }
  298. else if (IsXmlnsAttribute (Reader.Name)) {
  299. }
  300. else {
  301. #if NET_2_0
  302. ServiceDescription.AddUnknownAttribute ((XmlAttribute) ReadXmlNode (false));
  303. #else
  304. UnknownNode (ob);
  305. #endif
  306. }
  307. }
  308. #if NET_2_0
  309. ServiceDescription.SetExtensibleAttributes (ob);
  310. #endif
  311. Reader.MoveToElement();
  312. if (Reader.IsEmptyElement) {
  313. Reader.Skip ();
  314. return ob;
  315. }
  316. Reader.ReadStartElement();
  317. Reader.MoveToContent();
  318. bool b25=false, b26=false;
  319. System.Web.Services.Description.OperationCollection o28;
  320. o28 = ob.@Operations;
  321. int n27=0;
  322. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  323. {
  324. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  325. {
  326. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b25) {
  327. ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
  328. }
  329. else if (Reader.LocalName == "operation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b26) {
  330. if (((object)o28) == null)
  331. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationCollection");
  332. o28.Add (ReadObject_Operation (false, true));
  333. n27++;
  334. }
  335. else {
  336. UnknownNode (ob);
  337. }
  338. }
  339. else
  340. UnknownNode(ob);
  341. Reader.MoveToContent();
  342. }
  343. ReadEndElement();
  344. return ob;
  345. }
  346. public System.Web.Services.Description.Import ReadObject_Import (bool isNullable, bool checkType)
  347. {
  348. System.Web.Services.Description.Import ob = null;
  349. if (isNullable && ReadNull()) return null;
  350. if (checkType)
  351. {
  352. System.Xml.XmlQualifiedName t = GetXsiType();
  353. if (t == null)
  354. { }
  355. else if (t.Name != "Import" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  356. throw CreateUnknownTypeException(t);
  357. }
  358. ob = new System.Web.Services.Description.Import ();
  359. Reader.MoveToElement();
  360. while (Reader.MoveToNextAttribute())
  361. {
  362. if (Reader.LocalName == "location" && Reader.NamespaceURI == "") {
  363. ob.@Location = Reader.Value;
  364. }
  365. else if (Reader.LocalName == "namespace" && Reader.NamespaceURI == "") {
  366. ob.@Namespace = Reader.Value;
  367. }
  368. else if (IsXmlnsAttribute (Reader.Name)) {
  369. }
  370. else {
  371. #if NET_2_0
  372. ServiceDescription.AddUnknownAttribute ((XmlAttribute) ReadXmlNode (false));
  373. #else
  374. UnknownNode (ob);
  375. #endif
  376. }
  377. }
  378. #if NET_2_0
  379. ServiceDescription.SetExtensibleAttributes (ob);
  380. #endif
  381. Reader.MoveToElement();
  382. if (Reader.IsEmptyElement) {
  383. Reader.Skip ();
  384. return ob;
  385. }
  386. Reader.ReadStartElement();
  387. Reader.MoveToContent();
  388. bool b29=false;
  389. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  390. {
  391. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  392. {
  393. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b29) {
  394. ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
  395. }
  396. else {
  397. UnknownNode (ob);
  398. }
  399. }
  400. else
  401. UnknownNode(ob);
  402. Reader.MoveToContent();
  403. }
  404. ReadEndElement();
  405. return ob;
  406. }
  407. public System.Web.Services.Description.Binding ReadObject_Binding (bool isNullable, bool checkType)
  408. {
  409. System.Web.Services.Description.Binding ob = null;
  410. if (isNullable && ReadNull()) return null;
  411. if (checkType)
  412. {
  413. System.Xml.XmlQualifiedName t = GetXsiType();
  414. if (t == null)
  415. { }
  416. else if (t.Name != "Binding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  417. throw CreateUnknownTypeException(t);
  418. }
  419. ob = new System.Web.Services.Description.Binding ();
  420. Reader.MoveToElement();
  421. while (Reader.MoveToNextAttribute())
  422. {
  423. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  424. ob.@Name = Reader.Value;
  425. }
  426. else if (Reader.LocalName == "type" && Reader.NamespaceURI == "") {
  427. ob.@Type = ToXmlQualifiedName (Reader.Value);
  428. }
  429. else if (IsXmlnsAttribute (Reader.Name)) {
  430. }
  431. else {
  432. #if NET_2_0
  433. ServiceDescription.AddUnknownAttribute ((XmlAttribute) ReadXmlNode (false));
  434. #else
  435. UnknownNode (ob);
  436. #endif
  437. }
  438. }
  439. #if NET_2_0
  440. ServiceDescription.SetExtensibleAttributes (ob);
  441. #endif
  442. Reader.MoveToElement();
  443. if (Reader.IsEmptyElement) {
  444. Reader.Skip ();
  445. return ob;
  446. }
  447. Reader.ReadStartElement();
  448. Reader.MoveToContent();
  449. bool b30=false, b31=false;
  450. System.Web.Services.Description.OperationBindingCollection o33;
  451. o33 = ob.@Operations;
  452. int n32=0;
  453. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  454. {
  455. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  456. {
  457. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b30) {
  458. ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
  459. }
  460. else if (Reader.LocalName == "operation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b31) {
  461. if (((object)o33) == null)
  462. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationBindingCollection");
  463. o33.Add (ReadObject_OperationBinding (false, true));
  464. n32++;
  465. }
  466. else {
  467. ServiceDescription.ReadExtension (Reader, ob);
  468. }
  469. }
  470. else
  471. UnknownNode(ob);
  472. Reader.MoveToContent();
  473. }
  474. ReadEndElement();
  475. return ob;
  476. }
  477. public System.Web.Services.Description.Types ReadObject_Types (bool isNullable, bool checkType)
  478. {
  479. System.Web.Services.Description.Types ob = null;
  480. if (isNullable && ReadNull()) return null;
  481. if (checkType)
  482. {
  483. System.Xml.XmlQualifiedName t = GetXsiType();
  484. if (t == null)
  485. { }
  486. else if (t.Name != "Types" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  487. throw CreateUnknownTypeException(t);
  488. }
  489. ob = new System.Web.Services.Description.Types ();
  490. Reader.MoveToElement();
  491. while (Reader.MoveToNextAttribute())
  492. {
  493. if (IsXmlnsAttribute (Reader.Name)) {
  494. }
  495. else {
  496. #if NET_2_0
  497. ServiceDescription.AddUnknownAttribute ((XmlAttribute) ReadXmlNode (false));
  498. #else
  499. UnknownNode (ob);
  500. #endif
  501. }
  502. }
  503. #if NET_2_0
  504. ServiceDescription.SetExtensibleAttributes (ob);
  505. #endif
  506. Reader.MoveToElement();
  507. if (Reader.IsEmptyElement) {
  508. Reader.Skip ();
  509. return ob;
  510. }
  511. Reader.ReadStartElement();
  512. Reader.MoveToContent();
  513. bool b34=false, b35=false;
  514. System.Xml.Serialization.XmlSchemas o37;
  515. o37 = ob.@Schemas;
  516. int n36=0;
  517. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  518. {
  519. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  520. {
  521. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b34) {
  522. ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
  523. }
  524. else if (Reader.LocalName == "schema" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b35) {
  525. if (((object)o37) == null)
  526. throw CreateReadOnlyCollectionException ("System.Xml.Serialization.XmlSchemas");
  527. o37.Add (ReadObject_XmlSchema (false, true));
  528. n36++;
  529. }
  530. else {
  531. ServiceDescription.ReadExtension (Reader, ob);
  532. }
  533. }
  534. else
  535. UnknownNode(ob);
  536. Reader.MoveToContent();
  537. }
  538. ReadEndElement();
  539. return ob;
  540. }
  541. public System.Web.Services.Description.Port ReadObject_Port (bool isNullable, bool checkType)
  542. {
  543. System.Web.Services.Description.Port ob = null;
  544. if (isNullable && ReadNull()) return null;
  545. if (checkType)
  546. {
  547. System.Xml.XmlQualifiedName t = GetXsiType();
  548. if (t == null)
  549. { }
  550. else if (t.Name != "Port" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  551. throw CreateUnknownTypeException(t);
  552. }
  553. ob = new System.Web.Services.Description.Port ();
  554. Reader.MoveToElement();
  555. while (Reader.MoveToNextAttribute())
  556. {
  557. if (Reader.LocalName == "binding" && Reader.NamespaceURI == "") {
  558. ob.@Binding = ToXmlQualifiedName (Reader.Value);
  559. }
  560. else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  561. ob.@Name = Reader.Value;
  562. }
  563. else if (IsXmlnsAttribute (Reader.Name)) {
  564. }
  565. else {
  566. #if NET_2_0
  567. ServiceDescription.AddUnknownAttribute ((XmlAttribute) ReadXmlNode (false));
  568. #else
  569. UnknownNode (ob);
  570. #endif
  571. }
  572. }
  573. #if NET_2_0
  574. ServiceDescription.SetExtensibleAttributes (ob);
  575. #endif
  576. Reader.MoveToElement();
  577. if (Reader.IsEmptyElement) {
  578. Reader.Skip ();
  579. return ob;
  580. }
  581. Reader.ReadStartElement();
  582. Reader.MoveToContent();
  583. bool b38=false;
  584. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  585. {
  586. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  587. {
  588. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b38) {
  589. ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
  590. }
  591. else {
  592. ServiceDescription.ReadExtension (Reader, ob);
  593. }
  594. }
  595. else
  596. UnknownNode(ob);
  597. Reader.MoveToContent();
  598. }
  599. ReadEndElement();
  600. return ob;
  601. }
  602. public System.Web.Services.Description.MessagePart ReadObject_MessagePart (bool isNullable, bool checkType)
  603. {
  604. System.Web.Services.Description.MessagePart ob = null;
  605. if (isNullable && ReadNull()) return null;
  606. if (checkType)
  607. {
  608. System.Xml.XmlQualifiedName t = GetXsiType();
  609. if (t == null)
  610. { }
  611. else if (t.Name != "MessagePart" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  612. throw CreateUnknownTypeException(t);
  613. }
  614. ob = new System.Web.Services.Description.MessagePart ();
  615. Reader.MoveToElement();
  616. while (Reader.MoveToNextAttribute())
  617. {
  618. if (Reader.LocalName == "element" && Reader.NamespaceURI == "") {
  619. ob.@Element = ToXmlQualifiedName (Reader.Value);
  620. }
  621. else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  622. ob.@Name = Reader.Value;
  623. }
  624. else if (Reader.LocalName == "type" && Reader.NamespaceURI == "") {
  625. ob.@Type = ToXmlQualifiedName (Reader.Value);
  626. }
  627. else if (IsXmlnsAttribute (Reader.Name)) {
  628. }
  629. else {
  630. #if NET_2_0
  631. ServiceDescription.AddUnknownAttribute ((XmlAttribute) ReadXmlNode (false));
  632. #else
  633. UnknownNode (ob);
  634. #endif
  635. }
  636. }
  637. #if NET_2_0
  638. ServiceDescription.SetExtensibleAttributes (ob);
  639. #endif
  640. Reader.MoveToElement();
  641. if (Reader.IsEmptyElement) {
  642. Reader.Skip ();
  643. return ob;
  644. }
  645. Reader.ReadStartElement();
  646. Reader.MoveToContent();
  647. bool b39=false;
  648. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  649. {
  650. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  651. {
  652. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b39) {
  653. ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
  654. }
  655. else {
  656. UnknownNode (ob);
  657. }
  658. }
  659. else
  660. UnknownNode(ob);
  661. Reader.MoveToContent();
  662. }
  663. ReadEndElement();
  664. return ob;
  665. }
  666. public System.Web.Services.Description.Operation ReadObject_Operation (bool isNullable, bool checkType)
  667. {
  668. System.Web.Services.Description.Operation ob = null;
  669. if (isNullable && ReadNull()) return null;
  670. if (checkType)
  671. {
  672. System.Xml.XmlQualifiedName t = GetXsiType();
  673. if (t == null)
  674. { }
  675. else if (t.Name != "Operation" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  676. throw CreateUnknownTypeException(t);
  677. }
  678. ob = new System.Web.Services.Description.Operation ();
  679. Reader.MoveToElement();
  680. ob.@ParameterOrderString = "";
  681. while (Reader.MoveToNextAttribute())
  682. {
  683. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  684. ob.@Name = Reader.Value;
  685. }
  686. else if (Reader.LocalName == "parameterOrder" && Reader.NamespaceURI == "") {
  687. ob.@ParameterOrderString = Reader.Value;
  688. }
  689. else if (IsXmlnsAttribute (Reader.Name)) {
  690. }
  691. else {
  692. #if NET_2_0
  693. ServiceDescription.AddUnknownAttribute ((XmlAttribute) ReadXmlNode (false));
  694. #else
  695. UnknownNode (ob);
  696. #endif
  697. }
  698. }
  699. #if NET_2_0
  700. ServiceDescription.SetExtensibleAttributes (ob);
  701. #endif
  702. Reader.MoveToElement();
  703. if (Reader.IsEmptyElement) {
  704. Reader.Skip ();
  705. return ob;
  706. }
  707. Reader.ReadStartElement();
  708. Reader.MoveToContent();
  709. bool b40=false, b41=false, b42=false;
  710. System.Web.Services.Description.OperationFaultCollection o44;
  711. o44 = ob.@Faults;
  712. System.Web.Services.Description.OperationMessageCollection o46;
  713. o46 = ob.@Messages;
  714. int n43=0, n45=0;
  715. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  716. {
  717. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  718. {
  719. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b40) {
  720. ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
  721. }
  722. else if (Reader.LocalName == "fault" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b41) {
  723. if (((object)o44) == null)
  724. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationFaultCollection");
  725. o44.Add (ReadObject_OperationFault (false, true));
  726. n43++;
  727. }
  728. else if (Reader.LocalName == "input" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b42) {
  729. if (((object)o46) == null)
  730. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationMessageCollection");
  731. o46.Add (ReadObject_OperationInput (false, true));
  732. n45++;
  733. }
  734. else if (Reader.LocalName == "output" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b42) {
  735. if (((object)o46) == null)
  736. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.OperationMessageCollection");
  737. o46.Add (ReadObject_OperationOutput (false, true));
  738. n45++;
  739. }
  740. else {
  741. UnknownNode (ob);
  742. }
  743. }
  744. else
  745. UnknownNode(ob);
  746. Reader.MoveToContent();
  747. }
  748. ReadEndElement();
  749. return ob;
  750. }
  751. public System.Web.Services.Description.OperationBinding ReadObject_OperationBinding (bool isNullable, bool checkType)
  752. {
  753. System.Web.Services.Description.OperationBinding ob = null;
  754. if (isNullable && ReadNull()) return null;
  755. if (checkType)
  756. {
  757. System.Xml.XmlQualifiedName t = GetXsiType();
  758. if (t == null)
  759. { }
  760. else if (t.Name != "OperationBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  761. throw CreateUnknownTypeException(t);
  762. }
  763. ob = new System.Web.Services.Description.OperationBinding ();
  764. Reader.MoveToElement();
  765. while (Reader.MoveToNextAttribute())
  766. {
  767. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  768. ob.@Name = Reader.Value;
  769. }
  770. else if (IsXmlnsAttribute (Reader.Name)) {
  771. }
  772. else {
  773. #if NET_2_0
  774. ServiceDescription.AddUnknownAttribute ((XmlAttribute) ReadXmlNode (false));
  775. #else
  776. UnknownNode (ob);
  777. #endif
  778. }
  779. }
  780. #if NET_2_0
  781. ServiceDescription.SetExtensibleAttributes (ob);
  782. #endif
  783. Reader.MoveToElement();
  784. if (Reader.IsEmptyElement) {
  785. Reader.Skip ();
  786. return ob;
  787. }
  788. Reader.ReadStartElement();
  789. Reader.MoveToContent();
  790. bool b47=false, b48=false, b49=false, b50=false;
  791. System.Web.Services.Description.FaultBindingCollection o52;
  792. o52 = ob.@Faults;
  793. int n51=0;
  794. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  795. {
  796. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  797. {
  798. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b47) {
  799. ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
  800. }
  801. else if (Reader.LocalName == "fault" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b48) {
  802. if (((object)o52) == null)
  803. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.FaultBindingCollection");
  804. o52.Add (ReadObject_FaultBinding (false, true));
  805. n51++;
  806. }
  807. else if (Reader.LocalName == "input" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b49) {
  808. b49 = true;
  809. ob.@Input = ReadObject_InputBinding (false, true);
  810. }
  811. else if (Reader.LocalName == "output" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b50) {
  812. b50 = true;
  813. ob.@Output = ReadObject_OutputBinding (false, true);
  814. }
  815. else {
  816. ServiceDescription.ReadExtension (Reader, ob);
  817. }
  818. }
  819. else
  820. UnknownNode(ob);
  821. Reader.MoveToContent();
  822. }
  823. ReadEndElement();
  824. return ob;
  825. }
  826. public System.Xml.Schema.XmlSchema ReadObject_XmlSchema (bool isNullable, bool checkType)
  827. {
  828. System.Xml.Schema.XmlSchema ob = null;
  829. ob = System.Xml.Schema.XmlSchema.Read (Reader, null); Reader.Read ();
  830. return ob;
  831. }
  832. public System.Web.Services.Description.OperationFault ReadObject_OperationFault (bool isNullable, bool checkType)
  833. {
  834. System.Web.Services.Description.OperationFault ob = null;
  835. if (isNullable && ReadNull()) return null;
  836. if (checkType)
  837. {
  838. System.Xml.XmlQualifiedName t = GetXsiType();
  839. if (t == null)
  840. { }
  841. else if (t.Name != "OperationFault" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  842. throw CreateUnknownTypeException(t);
  843. }
  844. ob = new System.Web.Services.Description.OperationFault ();
  845. Reader.MoveToElement();
  846. while (Reader.MoveToNextAttribute())
  847. {
  848. if (Reader.LocalName == "message" && Reader.NamespaceURI == "") {
  849. ob.@Message = ToXmlQualifiedName (Reader.Value);
  850. }
  851. else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  852. ob.@Name = Reader.Value;
  853. }
  854. else if (IsXmlnsAttribute (Reader.Name)) {
  855. }
  856. else {
  857. #if NET_2_0
  858. ServiceDescription.AddUnknownAttribute ((XmlAttribute) ReadXmlNode (false));
  859. #else
  860. UnknownNode (ob);
  861. #endif
  862. }
  863. }
  864. #if NET_2_0
  865. ServiceDescription.SetExtensibleAttributes (ob);
  866. #endif
  867. Reader.MoveToElement();
  868. if (Reader.IsEmptyElement) {
  869. Reader.Skip ();
  870. return ob;
  871. }
  872. Reader.ReadStartElement();
  873. Reader.MoveToContent();
  874. bool b53=false;
  875. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  876. {
  877. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  878. {
  879. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b53) {
  880. ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
  881. }
  882. else {
  883. UnknownNode (ob);
  884. }
  885. }
  886. else
  887. UnknownNode(ob);
  888. Reader.MoveToContent();
  889. }
  890. ReadEndElement();
  891. return ob;
  892. }
  893. public System.Web.Services.Description.OperationInput ReadObject_OperationInput (bool isNullable, bool checkType)
  894. {
  895. System.Web.Services.Description.OperationInput ob = null;
  896. if (isNullable && ReadNull()) return null;
  897. if (checkType)
  898. {
  899. System.Xml.XmlQualifiedName t = GetXsiType();
  900. if (t == null)
  901. { }
  902. else if (t.Name != "OperationInput" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  903. throw CreateUnknownTypeException(t);
  904. }
  905. ob = new System.Web.Services.Description.OperationInput ();
  906. Reader.MoveToElement();
  907. while (Reader.MoveToNextAttribute())
  908. {
  909. if (Reader.LocalName == "message" && Reader.NamespaceURI == "") {
  910. ob.@Message = ToXmlQualifiedName (Reader.Value);
  911. }
  912. else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  913. ob.@Name = Reader.Value;
  914. }
  915. else if (IsXmlnsAttribute (Reader.Name)) {
  916. }
  917. else {
  918. #if NET_2_0
  919. ServiceDescription.AddUnknownAttribute ((XmlAttribute) ReadXmlNode (false));
  920. #else
  921. UnknownNode (ob);
  922. #endif
  923. }
  924. }
  925. #if NET_2_0
  926. ServiceDescription.SetExtensibleAttributes (ob);
  927. #endif
  928. Reader.MoveToElement();
  929. if (Reader.IsEmptyElement) {
  930. Reader.Skip ();
  931. return ob;
  932. }
  933. Reader.ReadStartElement();
  934. Reader.MoveToContent();
  935. bool b54=false;
  936. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  937. {
  938. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  939. {
  940. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b54) {
  941. ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
  942. }
  943. else {
  944. UnknownNode (ob);
  945. }
  946. }
  947. else
  948. UnknownNode(ob);
  949. Reader.MoveToContent();
  950. }
  951. ReadEndElement();
  952. return ob;
  953. }
  954. public System.Web.Services.Description.OperationOutput ReadObject_OperationOutput (bool isNullable, bool checkType)
  955. {
  956. System.Web.Services.Description.OperationOutput ob = null;
  957. if (isNullable && ReadNull()) return null;
  958. if (checkType)
  959. {
  960. System.Xml.XmlQualifiedName t = GetXsiType();
  961. if (t == null)
  962. { }
  963. else if (t.Name != "OperationOutput" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  964. throw CreateUnknownTypeException(t);
  965. }
  966. ob = new System.Web.Services.Description.OperationOutput ();
  967. Reader.MoveToElement();
  968. while (Reader.MoveToNextAttribute())
  969. {
  970. if (Reader.LocalName == "message" && Reader.NamespaceURI == "") {
  971. ob.@Message = ToXmlQualifiedName (Reader.Value);
  972. }
  973. else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  974. ob.@Name = Reader.Value;
  975. }
  976. else if (IsXmlnsAttribute (Reader.Name)) {
  977. }
  978. else {
  979. #if NET_2_0
  980. ServiceDescription.AddUnknownAttribute ((XmlAttribute) ReadXmlNode (false));
  981. #else
  982. UnknownNode (ob);
  983. #endif
  984. }
  985. }
  986. #if NET_2_0
  987. ServiceDescription.SetExtensibleAttributes (ob);
  988. #endif
  989. Reader.MoveToElement();
  990. if (Reader.IsEmptyElement) {
  991. Reader.Skip ();
  992. return ob;
  993. }
  994. Reader.ReadStartElement();
  995. Reader.MoveToContent();
  996. bool b55=false;
  997. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  998. {
  999. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  1000. {
  1001. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b55) {
  1002. ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
  1003. }
  1004. else {
  1005. UnknownNode (ob);
  1006. }
  1007. }
  1008. else
  1009. UnknownNode(ob);
  1010. Reader.MoveToContent();
  1011. }
  1012. ReadEndElement();
  1013. return ob;
  1014. }
  1015. public System.Web.Services.Description.FaultBinding ReadObject_FaultBinding (bool isNullable, bool checkType)
  1016. {
  1017. System.Web.Services.Description.FaultBinding ob = null;
  1018. if (isNullable && ReadNull()) return null;
  1019. if (checkType)
  1020. {
  1021. System.Xml.XmlQualifiedName t = GetXsiType();
  1022. if (t == null)
  1023. { }
  1024. else if (t.Name != "FaultBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  1025. throw CreateUnknownTypeException(t);
  1026. }
  1027. ob = new System.Web.Services.Description.FaultBinding ();
  1028. Reader.MoveToElement();
  1029. while (Reader.MoveToNextAttribute())
  1030. {
  1031. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  1032. ob.@Name = Reader.Value;
  1033. }
  1034. else if (IsXmlnsAttribute (Reader.Name)) {
  1035. }
  1036. else {
  1037. #if NET_2_0
  1038. ServiceDescription.AddUnknownAttribute ((XmlAttribute) ReadXmlNode (false));
  1039. #else
  1040. UnknownNode (ob);
  1041. #endif
  1042. }
  1043. }
  1044. #if NET_2_0
  1045. ServiceDescription.SetExtensibleAttributes (ob);
  1046. #endif
  1047. Reader.MoveToElement();
  1048. if (Reader.IsEmptyElement) {
  1049. Reader.Skip ();
  1050. return ob;
  1051. }
  1052. Reader.ReadStartElement();
  1053. Reader.MoveToContent();
  1054. bool b56=false, b57=false;
  1055. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  1056. {
  1057. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  1058. {
  1059. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b56) {
  1060. ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
  1061. }
  1062. else if (Reader.LocalName == "Extensions" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b57) {
  1063. if (((object)ob.@Extensions) == null)
  1064. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.ServiceDescriptionFormatExtensionCollection");
  1065. if (Reader.IsEmptyElement) {
  1066. Reader.Skip();
  1067. } else {
  1068. int n58 = 0;
  1069. Reader.ReadStartElement();
  1070. Reader.MoveToContent();
  1071. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  1072. {
  1073. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  1074. {
  1075. if (Reader.LocalName == "anyType" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/") {
  1076. if (((object)ob.@Extensions) == null)
  1077. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.ServiceDescriptionFormatExtensionCollection");
  1078. [email protected] (ReadObject_anyType (true, true));
  1079. n58++;
  1080. }
  1081. else UnknownNode (null);
  1082. }
  1083. else UnknownNode (null);
  1084. Reader.MoveToContent();
  1085. }
  1086. ReadEndElement();
  1087. }
  1088. b57 = true;
  1089. }
  1090. else {
  1091. ServiceDescription.ReadExtension (Reader, ob);
  1092. }
  1093. }
  1094. else
  1095. UnknownNode(ob);
  1096. Reader.MoveToContent();
  1097. }
  1098. ReadEndElement();
  1099. return ob;
  1100. }
  1101. public System.Web.Services.Description.InputBinding ReadObject_InputBinding (bool isNullable, bool checkType)
  1102. {
  1103. System.Web.Services.Description.InputBinding ob = null;
  1104. if (isNullable && ReadNull()) return null;
  1105. if (checkType)
  1106. {
  1107. System.Xml.XmlQualifiedName t = GetXsiType();
  1108. if (t == null)
  1109. { }
  1110. else if (t.Name != "InputBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  1111. throw CreateUnknownTypeException(t);
  1112. }
  1113. ob = new System.Web.Services.Description.InputBinding ();
  1114. Reader.MoveToElement();
  1115. while (Reader.MoveToNextAttribute())
  1116. {
  1117. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  1118. ob.@Name = Reader.Value;
  1119. }
  1120. else if (IsXmlnsAttribute (Reader.Name)) {
  1121. }
  1122. else {
  1123. #if NET_2_0
  1124. ServiceDescription.AddUnknownAttribute ((XmlAttribute) ReadXmlNode (false));
  1125. #else
  1126. UnknownNode (ob);
  1127. #endif
  1128. }
  1129. }
  1130. #if NET_2_0
  1131. ServiceDescription.SetExtensibleAttributes (ob);
  1132. #endif
  1133. Reader.MoveToElement();
  1134. if (Reader.IsEmptyElement) {
  1135. Reader.Skip ();
  1136. return ob;
  1137. }
  1138. Reader.ReadStartElement();
  1139. Reader.MoveToContent();
  1140. bool b59=false, b60=false;
  1141. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  1142. {
  1143. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  1144. {
  1145. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b59) {
  1146. ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
  1147. }
  1148. else if (Reader.LocalName == "Extensions" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b60) {
  1149. if (((object)ob.@Extensions) == null)
  1150. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.ServiceDescriptionFormatExtensionCollection");
  1151. if (Reader.IsEmptyElement) {
  1152. Reader.Skip();
  1153. } else {
  1154. int n61 = 0;
  1155. Reader.ReadStartElement();
  1156. Reader.MoveToContent();
  1157. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  1158. {
  1159. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  1160. {
  1161. if (Reader.LocalName == "anyType" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/") {
  1162. if (((object)ob.@Extensions) == null)
  1163. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.ServiceDescriptionFormatExtensionCollection");
  1164. [email protected] (ReadObject_anyType (true, true));
  1165. n61++;
  1166. }
  1167. else UnknownNode (null);
  1168. }
  1169. else UnknownNode (null);
  1170. Reader.MoveToContent();
  1171. }
  1172. ReadEndElement();
  1173. }
  1174. b60 = true;
  1175. }
  1176. else {
  1177. ServiceDescription.ReadExtension (Reader, ob);
  1178. }
  1179. }
  1180. else
  1181. UnknownNode(ob);
  1182. Reader.MoveToContent();
  1183. }
  1184. ReadEndElement();
  1185. return ob;
  1186. }
  1187. public System.Web.Services.Description.OutputBinding ReadObject_OutputBinding (bool isNullable, bool checkType)
  1188. {
  1189. System.Web.Services.Description.OutputBinding ob = null;
  1190. if (isNullable && ReadNull()) return null;
  1191. if (checkType)
  1192. {
  1193. System.Xml.XmlQualifiedName t = GetXsiType();
  1194. if (t == null)
  1195. { }
  1196. else if (t.Name != "OutputBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  1197. throw CreateUnknownTypeException(t);
  1198. }
  1199. ob = new System.Web.Services.Description.OutputBinding ();
  1200. Reader.MoveToElement();
  1201. while (Reader.MoveToNextAttribute())
  1202. {
  1203. if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  1204. ob.@Name = Reader.Value;
  1205. }
  1206. else if (IsXmlnsAttribute (Reader.Name)) {
  1207. }
  1208. else {
  1209. #if NET_2_0
  1210. ServiceDescription.AddUnknownAttribute ((XmlAttribute) ReadXmlNode (false));
  1211. #else
  1212. UnknownNode (ob);
  1213. #endif
  1214. }
  1215. }
  1216. #if NET_2_0
  1217. ServiceDescription.SetExtensibleAttributes (ob);
  1218. #endif
  1219. Reader.MoveToElement();
  1220. if (Reader.IsEmptyElement) {
  1221. Reader.Skip ();
  1222. return ob;
  1223. }
  1224. Reader.ReadStartElement();
  1225. Reader.MoveToContent();
  1226. bool b62=false, b63=false;
  1227. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  1228. {
  1229. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  1230. {
  1231. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b62) {
  1232. ob.@DocumentationElement = ((System.Xml.XmlElement) ReadXmlNode (false));
  1233. }
  1234. else if (Reader.LocalName == "Extensions" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/" && !b63) {
  1235. if (((object)ob.@Extensions) == null)
  1236. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.ServiceDescriptionFormatExtensionCollection");
  1237. if (Reader.IsEmptyElement) {
  1238. Reader.Skip();
  1239. } else {
  1240. int n64 = 0;
  1241. Reader.ReadStartElement();
  1242. Reader.MoveToContent();
  1243. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  1244. {
  1245. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  1246. {
  1247. if (Reader.LocalName == "anyType" && Reader.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/") {
  1248. if (((object)ob.@Extensions) == null)
  1249. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.ServiceDescriptionFormatExtensionCollection");
  1250. [email protected] (ReadObject_anyType (true, true));
  1251. n64++;
  1252. }
  1253. else UnknownNode (null);
  1254. }
  1255. else UnknownNode (null);
  1256. Reader.MoveToContent();
  1257. }
  1258. ReadEndElement();
  1259. }
  1260. b63 = true;
  1261. }
  1262. else {
  1263. ServiceDescription.ReadExtension (Reader, ob);
  1264. }
  1265. }
  1266. else
  1267. UnknownNode(ob);
  1268. Reader.MoveToContent();
  1269. }
  1270. ReadEndElement();
  1271. return ob;
  1272. }
  1273. public System.Object ReadObject_anyType (bool isNullable, bool checkType)
  1274. {
  1275. System.Object ob = null;
  1276. if (isNullable && ReadNull()) return null;
  1277. if (checkType)
  1278. {
  1279. System.Xml.XmlQualifiedName t = GetXsiType();
  1280. if (t == null)
  1281. return ((System.Object) ReadTypedPrimitive (new System.Xml.XmlQualifiedName("anyType", System.Xml.Schema.XmlSchema.Namespace)));
  1282. else if (t.Name == "DocumentableItem" && t.Namespace == "")
  1283. return ReadObject_DocumentableItem (isNullable, checkType);
  1284. else if (t.Name == "DocumentableItem" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1285. return ReadObject_DocumentableItem0 (isNullable, checkType);
  1286. else if (t.Name == "Import" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1287. return ReadObject_Import (isNullable, checkType);
  1288. else if (t.Name == "XmlSchemaObject" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1289. return ReadObject_XmlSchemaObject (isNullable, checkType);
  1290. else if (t.Name == "XmlSchemaForm" && t.Namespace == "")
  1291. return ReadObject_XmlSchemaForm (isNullable, checkType);
  1292. else if (t.Name == "XmlSchemaDerivationMethod" && t.Namespace == "")
  1293. return ReadObject_XmlSchemaDerivationMethod (isNullable, checkType);
  1294. else if (t.Name == "XmlSchemaExternal" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1295. return ReadObject_XmlSchemaExternal (isNullable, checkType);
  1296. else if (t.Name == "XmlSchemaDocumentation" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1297. return ReadObject_XmlSchemaDocumentation (isNullable, checkType);
  1298. else if (t.Name == "XmlSchemaAppInfo" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1299. return ReadObject_XmlSchemaAppInfo (isNullable, checkType);
  1300. else if (t.Name == "XmlSchemaAnnotation" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1301. return ReadObject_XmlSchemaAnnotation (isNullable, checkType);
  1302. else if (t.Name == "XmlSchemaAnnotated" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1303. return ReadObject_XmlSchemaAnnotated (isNullable, checkType);
  1304. else if (t.Name == "XmlSchemaAttributeGroupRef" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1305. return ReadObject_XmlSchemaAttributeGroupRef (isNullable, checkType);
  1306. else if (t.Name == "XmlSchemaType" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1307. return ReadObject_XmlSchemaType (isNullable, checkType);
  1308. else if (t.Name == "ArrayOfQName" && t.Namespace == "")
  1309. return ReadObject_ArrayOfQName (isNullable, checkType);
  1310. else if (t.Name == "XmlSchemaSimpleTypeContent" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1311. return ReadObject_XmlSchemaSimpleTypeContent (isNullable, checkType);
  1312. else if (t.Name == "XmlSchemaSimpleTypeUnion" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1313. return ReadObject_XmlSchemaSimpleTypeUnion (isNullable, checkType);
  1314. else if (t.Name == "XmlSchemaSimpleTypeList" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1315. return ReadObject_XmlSchemaSimpleTypeList (isNullable, checkType);
  1316. else if (t.Name == "XmlSchemaFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1317. return ReadObject_XmlSchemaFacet (isNullable, checkType);
  1318. else if (t.Name == "XmlSchemaPatternFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1319. return ReadObject_XmlSchemaPatternFacet (isNullable, checkType);
  1320. else if (t.Name == "XmlSchemaWhiteSpaceFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1321. return ReadObject_XmlSchemaWhiteSpaceFacet (isNullable, checkType);
  1322. else if (t.Name == "XmlSchemaEnumerationFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1323. return ReadObject_XmlSchemaEnumerationFacet (isNullable, checkType);
  1324. else if (t.Name == "XmlSchemaNumericFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1325. return ReadObject_XmlSchemaNumericFacet (isNullable, checkType);
  1326. else if (t.Name == "XmlSchemaMaxLengthFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1327. return ReadObject_XmlSchemaMaxLengthFacet (isNullable, checkType);
  1328. else if (t.Name == "XmlSchemaMinLengthFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1329. return ReadObject_XmlSchemaMinLengthFacet (isNullable, checkType);
  1330. else if (t.Name == "XmlSchemaLengthFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1331. return ReadObject_XmlSchemaLengthFacet (isNullable, checkType);
  1332. else if (t.Name == "XmlSchemaFractionDigitsFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1333. return ReadObject_XmlSchemaFractionDigitsFacet (isNullable, checkType);
  1334. else if (t.Name == "XmlSchemaTotalDigitsFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1335. return ReadObject_XmlSchemaTotalDigitsFacet (isNullable, checkType);
  1336. else if (t.Name == "XmlSchemaMaxInclusiveFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1337. return ReadObject_XmlSchemaMaxInclusiveFacet (isNullable, checkType);
  1338. else if (t.Name == "XmlSchemaMaxExclusiveFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1339. return ReadObject_XmlSchemaMaxExclusiveFacet (isNullable, checkType);
  1340. else if (t.Name == "XmlSchemaMinInclusiveFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1341. return ReadObject_XmlSchemaMinInclusiveFacet (isNullable, checkType);
  1342. else if (t.Name == "XmlSchemaMinExclusiveFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1343. return ReadObject_XmlSchemaMinExclusiveFacet (isNullable, checkType);
  1344. else if (t.Name == "XmlSchemaSimpleTypeRestriction" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1345. return ReadObject_XmlSchemaSimpleTypeRestriction (isNullable, checkType);
  1346. else if (t.Name == "XmlSchemaSimpleType" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1347. return ReadObject_XmlSchemaSimpleType (isNullable, checkType);
  1348. else if (t.Name == "XmlSchemaUse" && t.Namespace == "")
  1349. return ReadObject_XmlSchemaUse (isNullable, checkType);
  1350. else if (t.Name == "XmlSchemaAttribute" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1351. return ReadObject_XmlSchemaAttribute (isNullable, checkType);
  1352. else if (t.Name == "XmlSchemaContentProcessing" && t.Namespace == "")
  1353. return ReadObject_XmlSchemaContentProcessing (isNullable, checkType);
  1354. else if (t.Name == "XmlSchemaAnyAttribute" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1355. return ReadObject_XmlSchemaAnyAttribute (isNullable, checkType);
  1356. else if (t.Name == "XmlSchemaAttributeGroup" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1357. return ReadObject_XmlSchemaAttributeGroup (isNullable, checkType);
  1358. else if (t.Name == "XmlSchemaParticle" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1359. return ReadObject_XmlSchemaParticle (isNullable, checkType);
  1360. else if (t.Name == "XmlSchemaAny" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1361. return ReadObject_XmlSchemaAny (isNullable, checkType);
  1362. else if (t.Name == "XmlSchemaGroupRef" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1363. return ReadObject_XmlSchemaGroupRef (isNullable, checkType);
  1364. else if (t.Name == "XmlSchemaGroupBase" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1365. return ReadObject_XmlSchemaGroupBase (isNullable, checkType);
  1366. else if (t.Name == "XmlSchemaAll" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1367. return ReadObject_XmlSchemaAll (isNullable, checkType);
  1368. else if (t.Name == "XmlSchemaContent" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1369. return ReadObject_XmlSchemaContent (isNullable, checkType);
  1370. else if (t.Name == "XmlSchemaComplexContentExtension" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1371. return ReadObject_XmlSchemaComplexContentExtension (isNullable, checkType);
  1372. else if (t.Name == "XmlSchemaComplexContentRestriction" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1373. return ReadObject_XmlSchemaComplexContentRestriction (isNullable, checkType);
  1374. else if (t.Name == "XmlSchemaContentModel" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1375. return ReadObject_XmlSchemaContentModel (isNullable, checkType);
  1376. else if (t.Name == "XmlSchemaComplexContent" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1377. return ReadObject_XmlSchemaComplexContent (isNullable, checkType);
  1378. else if (t.Name == "XmlSchemaSimpleContentExtension" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1379. return ReadObject_XmlSchemaSimpleContentExtension (isNullable, checkType);
  1380. else if (t.Name == "XmlSchemaSimpleContentRestriction" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1381. return ReadObject_XmlSchemaSimpleContentRestriction (isNullable, checkType);
  1382. else if (t.Name == "XmlSchemaSimpleContent" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1383. return ReadObject_XmlSchemaSimpleContent (isNullable, checkType);
  1384. else if (t.Name == "XmlSchemaComplexType" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1385. return ReadObject_XmlSchemaComplexType (isNullable, checkType);
  1386. else if (t.Name == "XmlSchemaXPath" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1387. return ReadObject_XmlSchemaXPath (isNullable, checkType);
  1388. else if (t.Name == "XmlSchemaIdentityConstraint" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1389. return ReadObject_XmlSchemaIdentityConstraint (isNullable, checkType);
  1390. else if (t.Name == "XmlSchemaKeyref" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1391. return ReadObject_XmlSchemaKeyref (isNullable, checkType);
  1392. else if (t.Name == "XmlSchemaKey" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1393. return ReadObject_XmlSchemaKey (isNullable, checkType);
  1394. else if (t.Name == "XmlSchemaUnique" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1395. return ReadObject_XmlSchemaUnique (isNullable, checkType);
  1396. else if (t.Name == "XmlSchemaElement" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1397. return ReadObject_XmlSchemaElement (isNullable, checkType);
  1398. else if (t.Name == "XmlSchemaChoice" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1399. return ReadObject_XmlSchemaChoice (isNullable, checkType);
  1400. else if (t.Name == "XmlSchemaSequence" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1401. return ReadObject_XmlSchemaSequence (isNullable, checkType);
  1402. else if (t.Name == "XmlSchemaGroup" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1403. return ReadObject_XmlSchemaGroup (isNullable, checkType);
  1404. else if (t.Name == "XmlSchemaRedefine" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1405. return ReadObject_XmlSchemaRedefine (isNullable, checkType);
  1406. else if (t.Name == "XmlSchemaImport" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1407. return ReadObject_XmlSchemaImport (isNullable, checkType);
  1408. else if (t.Name == "XmlSchemaInclude" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1409. return ReadObject_XmlSchemaInclude (isNullable, checkType);
  1410. else if (t.Name == "XmlSchemaNotation" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1411. return ReadObject_XmlSchemaNotation (isNullable, checkType);
  1412. else if (t.Name == "XmlSchema" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1413. return ReadObject_XmlSchema (isNullable, checkType);
  1414. else if (t.Name == "Types" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1415. return ReadObject_Types (isNullable, checkType);
  1416. else if (t.Name == "MessagePart" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1417. return ReadObject_MessagePart (isNullable, checkType);
  1418. else if (t.Name == "Message" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1419. return ReadObject_Message (isNullable, checkType);
  1420. else if (t.Name == "OperationMessage" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1421. return ReadObject_OperationMessage (isNullable, checkType);
  1422. else if (t.Name == "OperationFault" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1423. return ReadObject_OperationFault (isNullable, checkType);
  1424. else if (t.Name == "OperationInput" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1425. return ReadObject_OperationInput (isNullable, checkType);
  1426. else if (t.Name == "OperationOutput" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1427. return ReadObject_OperationOutput (isNullable, checkType);
  1428. else if (t.Name == "Operation" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1429. return ReadObject_Operation (isNullable, checkType);
  1430. else if (t.Name == "PortType" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1431. return ReadObject_PortType (isNullable, checkType);
  1432. else if (t.Name == "ArrayOfAnyType" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1433. return ReadObject_ArrayOfAnyType (isNullable, checkType);
  1434. else if (t.Name == "MessageBinding" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1435. return ReadObject_MessageBinding (isNullable, checkType);
  1436. else if (t.Name == "FaultBinding" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1437. return ReadObject_FaultBinding (isNullable, checkType);
  1438. else if (t.Name == "InputBinding" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1439. return ReadObject_InputBinding (isNullable, checkType);
  1440. else if (t.Name == "OutputBinding" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1441. return ReadObject_OutputBinding (isNullable, checkType);
  1442. else if (t.Name == "OperationBinding" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1443. return ReadObject_OperationBinding (isNullable, checkType);
  1444. else if (t.Name == "Binding" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1445. return ReadObject_Binding (isNullable, checkType);
  1446. else if (t.Name == "Port" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1447. return ReadObject_Port (isNullable, checkType);
  1448. else if (t.Name == "Service" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1449. return ReadObject_Service (isNullable, checkType);
  1450. else if (t.Name == "ServiceDescription" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1451. return ReadObject_ServiceDescription (isNullable, checkType);
  1452. else if (t.Name != "anyType" || t.Namespace != "")
  1453. return ((System.Object) ReadTypedPrimitive (t));
  1454. }
  1455. ob = new System.Object ();
  1456. Reader.MoveToElement();
  1457. while (Reader.MoveToNextAttribute())
  1458. {
  1459. if (IsXmlnsAttribute (Reader.Name)) {
  1460. }
  1461. else {
  1462. #if NET_2_0
  1463. ServiceDescription.AddUnknownAttribute ((XmlAttribute) ReadXmlNode (false));
  1464. #else
  1465. UnknownNode (ob);
  1466. #endif
  1467. }
  1468. }
  1469. #if NET_2_0
  1470. ServiceDescription.SetExtensibleAttributes (ob);
  1471. #endif
  1472. Reader.MoveToElement();
  1473. if (Reader.IsEmptyElement) {
  1474. Reader.Skip ();
  1475. return ob;
  1476. }
  1477. Reader.ReadStartElement();
  1478. Reader.MoveToContent();
  1479. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  1480. {
  1481. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  1482. {
  1483. UnknownNode (ob);
  1484. }
  1485. else
  1486. UnknownNode(ob);
  1487. Reader.MoveToContent();
  1488. }
  1489. ReadEndElement();
  1490. return ob;
  1491. }
  1492. public System.Web.Services.Description.DocumentableItem ReadObject_DocumentableItem (bool isNullable, bool checkType)
  1493. {
  1494. System.Web.Services.Description.DocumentableItem ob = null;
  1495. if (isNullable && ReadNull()) return null;
  1496. if (checkType)
  1497. {
  1498. System.Xml.XmlQualifiedName t = GetXsiType();
  1499. if (t == null)
  1500. { }
  1501. else if (t.Name == "ServiceDescription" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1502. return ReadObject_ServiceDescription (isNullable, checkType);
  1503. else if (t.Name != "DocumentableItem" || t.Namespace != "")
  1504. throw CreateUnknownTypeException(t);
  1505. }
  1506. return ob;
  1507. }
  1508. public System.Web.Services.Description.DocumentableItem ReadObject_DocumentableItem0 (bool isNullable, bool checkType)
  1509. {
  1510. System.Web.Services.Description.DocumentableItem ob = null;
  1511. if (isNullable && ReadNull()) return null;
  1512. if (checkType)
  1513. {
  1514. System.Xml.XmlQualifiedName t = GetXsiType();
  1515. if (t == null)
  1516. { }
  1517. else if (t.Name == "Import" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1518. return ReadObject_Import (isNullable, checkType);
  1519. else if (t.Name == "Types" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1520. return ReadObject_Types (isNullable, checkType);
  1521. else if (t.Name == "MessagePart" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1522. return ReadObject_MessagePart (isNullable, checkType);
  1523. else if (t.Name == "Message" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1524. return ReadObject_Message (isNullable, checkType);
  1525. else if (t.Name == "OperationMessage" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1526. return ReadObject_OperationMessage (isNullable, checkType);
  1527. else if (t.Name == "OperationFault" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1528. return ReadObject_OperationFault (isNullable, checkType);
  1529. else if (t.Name == "OperationInput" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1530. return ReadObject_OperationInput (isNullable, checkType);
  1531. else if (t.Name == "OperationOutput" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1532. return ReadObject_OperationOutput (isNullable, checkType);
  1533. else if (t.Name == "Operation" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1534. return ReadObject_Operation (isNullable, checkType);
  1535. else if (t.Name == "PortType" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1536. return ReadObject_PortType (isNullable, checkType);
  1537. else if (t.Name == "MessageBinding" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1538. return ReadObject_MessageBinding (isNullable, checkType);
  1539. else if (t.Name == "FaultBinding" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1540. return ReadObject_FaultBinding (isNullable, checkType);
  1541. else if (t.Name == "InputBinding" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1542. return ReadObject_InputBinding (isNullable, checkType);
  1543. else if (t.Name == "OutputBinding" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1544. return ReadObject_OutputBinding (isNullable, checkType);
  1545. else if (t.Name == "OperationBinding" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1546. return ReadObject_OperationBinding (isNullable, checkType);
  1547. else if (t.Name == "Binding" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1548. return ReadObject_Binding (isNullable, checkType);
  1549. else if (t.Name == "Port" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1550. return ReadObject_Port (isNullable, checkType);
  1551. else if (t.Name == "Service" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  1552. return ReadObject_Service (isNullable, checkType);
  1553. else if (t.Name != "DocumentableItem" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  1554. throw CreateUnknownTypeException(t);
  1555. }
  1556. return ob;
  1557. }
  1558. public System.Xml.Schema.XmlSchemaObject ReadObject_XmlSchemaObject (bool isNullable, bool checkType)
  1559. {
  1560. System.Xml.Schema.XmlSchemaObject ob = null;
  1561. if (isNullable && ReadNull()) return null;
  1562. if (checkType)
  1563. {
  1564. System.Xml.XmlQualifiedName t = GetXsiType();
  1565. if (t == null)
  1566. { }
  1567. else if (t.Name == "XmlSchemaExternal" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1568. return ReadObject_XmlSchemaExternal (isNullable, checkType);
  1569. else if (t.Name == "XmlSchemaDocumentation" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1570. return ReadObject_XmlSchemaDocumentation (isNullable, checkType);
  1571. else if (t.Name == "XmlSchemaAppInfo" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1572. return ReadObject_XmlSchemaAppInfo (isNullable, checkType);
  1573. else if (t.Name == "XmlSchemaAnnotation" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1574. return ReadObject_XmlSchemaAnnotation (isNullable, checkType);
  1575. else if (t.Name == "XmlSchemaAnnotated" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1576. return ReadObject_XmlSchemaAnnotated (isNullable, checkType);
  1577. else if (t.Name == "XmlSchemaAttributeGroupRef" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1578. return ReadObject_XmlSchemaAttributeGroupRef (isNullable, checkType);
  1579. else if (t.Name == "XmlSchemaType" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1580. return ReadObject_XmlSchemaType (isNullable, checkType);
  1581. else if (t.Name == "XmlSchemaSimpleTypeContent" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1582. return ReadObject_XmlSchemaSimpleTypeContent (isNullable, checkType);
  1583. else if (t.Name == "XmlSchemaSimpleTypeUnion" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1584. return ReadObject_XmlSchemaSimpleTypeUnion (isNullable, checkType);
  1585. else if (t.Name == "XmlSchemaSimpleTypeList" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1586. return ReadObject_XmlSchemaSimpleTypeList (isNullable, checkType);
  1587. else if (t.Name == "XmlSchemaFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1588. return ReadObject_XmlSchemaFacet (isNullable, checkType);
  1589. else if (t.Name == "XmlSchemaPatternFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1590. return ReadObject_XmlSchemaPatternFacet (isNullable, checkType);
  1591. else if (t.Name == "XmlSchemaWhiteSpaceFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1592. return ReadObject_XmlSchemaWhiteSpaceFacet (isNullable, checkType);
  1593. else if (t.Name == "XmlSchemaEnumerationFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1594. return ReadObject_XmlSchemaEnumerationFacet (isNullable, checkType);
  1595. else if (t.Name == "XmlSchemaNumericFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1596. return ReadObject_XmlSchemaNumericFacet (isNullable, checkType);
  1597. else if (t.Name == "XmlSchemaMaxLengthFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1598. return ReadObject_XmlSchemaMaxLengthFacet (isNullable, checkType);
  1599. else if (t.Name == "XmlSchemaMinLengthFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1600. return ReadObject_XmlSchemaMinLengthFacet (isNullable, checkType);
  1601. else if (t.Name == "XmlSchemaLengthFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1602. return ReadObject_XmlSchemaLengthFacet (isNullable, checkType);
  1603. else if (t.Name == "XmlSchemaFractionDigitsFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1604. return ReadObject_XmlSchemaFractionDigitsFacet (isNullable, checkType);
  1605. else if (t.Name == "XmlSchemaTotalDigitsFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1606. return ReadObject_XmlSchemaTotalDigitsFacet (isNullable, checkType);
  1607. else if (t.Name == "XmlSchemaMaxInclusiveFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1608. return ReadObject_XmlSchemaMaxInclusiveFacet (isNullable, checkType);
  1609. else if (t.Name == "XmlSchemaMaxExclusiveFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1610. return ReadObject_XmlSchemaMaxExclusiveFacet (isNullable, checkType);
  1611. else if (t.Name == "XmlSchemaMinInclusiveFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1612. return ReadObject_XmlSchemaMinInclusiveFacet (isNullable, checkType);
  1613. else if (t.Name == "XmlSchemaMinExclusiveFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1614. return ReadObject_XmlSchemaMinExclusiveFacet (isNullable, checkType);
  1615. else if (t.Name == "XmlSchemaSimpleTypeRestriction" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1616. return ReadObject_XmlSchemaSimpleTypeRestriction (isNullable, checkType);
  1617. else if (t.Name == "XmlSchemaSimpleType" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1618. return ReadObject_XmlSchemaSimpleType (isNullable, checkType);
  1619. else if (t.Name == "XmlSchemaAttribute" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1620. return ReadObject_XmlSchemaAttribute (isNullable, checkType);
  1621. else if (t.Name == "XmlSchemaAnyAttribute" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1622. return ReadObject_XmlSchemaAnyAttribute (isNullable, checkType);
  1623. else if (t.Name == "XmlSchemaAttributeGroup" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1624. return ReadObject_XmlSchemaAttributeGroup (isNullable, checkType);
  1625. else if (t.Name == "XmlSchemaParticle" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1626. return ReadObject_XmlSchemaParticle (isNullable, checkType);
  1627. else if (t.Name == "XmlSchemaAny" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1628. return ReadObject_XmlSchemaAny (isNullable, checkType);
  1629. else if (t.Name == "XmlSchemaGroupRef" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1630. return ReadObject_XmlSchemaGroupRef (isNullable, checkType);
  1631. else if (t.Name == "XmlSchemaGroupBase" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1632. return ReadObject_XmlSchemaGroupBase (isNullable, checkType);
  1633. else if (t.Name == "XmlSchemaAll" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1634. return ReadObject_XmlSchemaAll (isNullable, checkType);
  1635. else if (t.Name == "XmlSchemaContent" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1636. return ReadObject_XmlSchemaContent (isNullable, checkType);
  1637. else if (t.Name == "XmlSchemaComplexContentExtension" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1638. return ReadObject_XmlSchemaComplexContentExtension (isNullable, checkType);
  1639. else if (t.Name == "XmlSchemaComplexContentRestriction" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1640. return ReadObject_XmlSchemaComplexContentRestriction (isNullable, checkType);
  1641. else if (t.Name == "XmlSchemaContentModel" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1642. return ReadObject_XmlSchemaContentModel (isNullable, checkType);
  1643. else if (t.Name == "XmlSchemaComplexContent" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1644. return ReadObject_XmlSchemaComplexContent (isNullable, checkType);
  1645. else if (t.Name == "XmlSchemaSimpleContentExtension" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1646. return ReadObject_XmlSchemaSimpleContentExtension (isNullable, checkType);
  1647. else if (t.Name == "XmlSchemaSimpleContentRestriction" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1648. return ReadObject_XmlSchemaSimpleContentRestriction (isNullable, checkType);
  1649. else if (t.Name == "XmlSchemaSimpleContent" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1650. return ReadObject_XmlSchemaSimpleContent (isNullable, checkType);
  1651. else if (t.Name == "XmlSchemaComplexType" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1652. return ReadObject_XmlSchemaComplexType (isNullable, checkType);
  1653. else if (t.Name == "XmlSchemaXPath" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1654. return ReadObject_XmlSchemaXPath (isNullable, checkType);
  1655. else if (t.Name == "XmlSchemaIdentityConstraint" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1656. return ReadObject_XmlSchemaIdentityConstraint (isNullable, checkType);
  1657. else if (t.Name == "XmlSchemaKeyref" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1658. return ReadObject_XmlSchemaKeyref (isNullable, checkType);
  1659. else if (t.Name == "XmlSchemaKey" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1660. return ReadObject_XmlSchemaKey (isNullable, checkType);
  1661. else if (t.Name == "XmlSchemaUnique" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1662. return ReadObject_XmlSchemaUnique (isNullable, checkType);
  1663. else if (t.Name == "XmlSchemaElement" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1664. return ReadObject_XmlSchemaElement (isNullable, checkType);
  1665. else if (t.Name == "XmlSchemaChoice" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1666. return ReadObject_XmlSchemaChoice (isNullable, checkType);
  1667. else if (t.Name == "XmlSchemaSequence" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1668. return ReadObject_XmlSchemaSequence (isNullable, checkType);
  1669. else if (t.Name == "XmlSchemaGroup" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1670. return ReadObject_XmlSchemaGroup (isNullable, checkType);
  1671. else if (t.Name == "XmlSchemaRedefine" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1672. return ReadObject_XmlSchemaRedefine (isNullable, checkType);
  1673. else if (t.Name == "XmlSchemaImport" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1674. return ReadObject_XmlSchemaImport (isNullable, checkType);
  1675. else if (t.Name == "XmlSchemaInclude" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1676. return ReadObject_XmlSchemaInclude (isNullable, checkType);
  1677. else if (t.Name == "XmlSchemaNotation" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1678. return ReadObject_XmlSchemaNotation (isNullable, checkType);
  1679. else if (t.Name == "XmlSchema" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1680. return ReadObject_XmlSchema (isNullable, checkType);
  1681. else if (t.Name != "XmlSchemaObject" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  1682. throw CreateUnknownTypeException(t);
  1683. }
  1684. return ob;
  1685. }
  1686. public System.Xml.Schema.XmlSchemaForm ReadObject_XmlSchemaForm (bool isNullable, bool checkType)
  1687. {
  1688. Reader.ReadStartElement ();
  1689. System.Xml.Schema.XmlSchemaForm res = GetEnumValue_XmlSchemaForm (Reader.ReadString());
  1690. if (Reader.NodeType != XmlNodeType.None)
  1691. Reader.ReadEndElement ();
  1692. return res;
  1693. }
  1694. System.Xml.Schema.XmlSchemaForm GetEnumValue_XmlSchemaForm (string xmlName)
  1695. {
  1696. switch (xmlName)
  1697. {
  1698. case "qualified": return System.Xml.Schema.XmlSchemaForm.Qualified;
  1699. case "unqualified": return System.Xml.Schema.XmlSchemaForm.Unqualified;
  1700. default:
  1701. throw CreateUnknownConstantException (xmlName, typeof(System.Xml.Schema.XmlSchemaForm));
  1702. }
  1703. }
  1704. public System.Xml.Schema.XmlSchemaDerivationMethod ReadObject_XmlSchemaDerivationMethod (bool isNullable, bool checkType)
  1705. {
  1706. Reader.ReadStartElement ();
  1707. System.Xml.Schema.XmlSchemaDerivationMethod res = GetEnumValue_XmlSchemaDerivationMethod (Reader.ReadString());
  1708. if (Reader.NodeType != XmlNodeType.None)
  1709. Reader.ReadEndElement ();
  1710. return res;
  1711. }
  1712. System.Xml.Schema.XmlSchemaDerivationMethod GetEnumValue_XmlSchemaDerivationMethod (string xmlName)
  1713. {
  1714. xmlName = xmlName.Trim();
  1715. if (xmlName.Length == 0) return (System.Xml.Schema.XmlSchemaDerivationMethod)0;
  1716. if (xmlName.IndexOf (' ') != -1)
  1717. {
  1718. System.Xml.Schema.XmlSchemaDerivationMethod sb = (System.Xml.Schema.XmlSchemaDerivationMethod)0;
  1719. string[] enumNames = xmlName.ToString().Split (' ');
  1720. foreach (string name in enumNames)
  1721. {
  1722. if (name == string.Empty) continue;
  1723. sb |= GetEnumValue_XmlSchemaDerivationMethod_Switch (name);
  1724. }
  1725. return sb;
  1726. }
  1727. else
  1728. return GetEnumValue_XmlSchemaDerivationMethod_Switch (xmlName);
  1729. }
  1730. System.Xml.Schema.XmlSchemaDerivationMethod GetEnumValue_XmlSchemaDerivationMethod_Switch (string xmlName)
  1731. {
  1732. switch (xmlName)
  1733. {
  1734. case "": return System.Xml.Schema.XmlSchemaDerivationMethod.Empty;
  1735. case "substitution": return System.Xml.Schema.XmlSchemaDerivationMethod.Substitution;
  1736. case "extension": return System.Xml.Schema.XmlSchemaDerivationMethod.Extension;
  1737. case "restriction": return System.Xml.Schema.XmlSchemaDerivationMethod.Restriction;
  1738. case "list": return System.Xml.Schema.XmlSchemaDerivationMethod.List;
  1739. case "union": return System.Xml.Schema.XmlSchemaDerivationMethod.Union;
  1740. case "#all": return System.Xml.Schema.XmlSchemaDerivationMethod.All;
  1741. default:
  1742. throw CreateUnknownConstantException (xmlName, typeof(System.Xml.Schema.XmlSchemaDerivationMethod));
  1743. }
  1744. }
  1745. public System.Xml.Schema.XmlSchemaExternal ReadObject_XmlSchemaExternal (bool isNullable, bool checkType)
  1746. {
  1747. System.Xml.Schema.XmlSchemaExternal ob = null;
  1748. if (isNullable && ReadNull()) return null;
  1749. if (checkType)
  1750. {
  1751. System.Xml.XmlQualifiedName t = GetXsiType();
  1752. if (t == null)
  1753. { }
  1754. else if (t.Name == "XmlSchemaRedefine" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1755. return ReadObject_XmlSchemaRedefine (isNullable, checkType);
  1756. else if (t.Name == "XmlSchemaImport" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1757. return ReadObject_XmlSchemaImport (isNullable, checkType);
  1758. else if (t.Name == "XmlSchemaInclude" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1759. return ReadObject_XmlSchemaInclude (isNullable, checkType);
  1760. else if (t.Name != "XmlSchemaExternal" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  1761. throw CreateUnknownTypeException(t);
  1762. }
  1763. return ob;
  1764. }
  1765. public System.Xml.Schema.XmlSchemaDocumentation ReadObject_XmlSchemaDocumentation (bool isNullable, bool checkType)
  1766. {
  1767. System.Xml.Schema.XmlSchemaDocumentation ob = null;
  1768. if (isNullable && ReadNull()) return null;
  1769. if (checkType)
  1770. {
  1771. System.Xml.XmlQualifiedName t = GetXsiType();
  1772. if (t == null)
  1773. { }
  1774. else if (t.Name != "XmlSchemaDocumentation" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  1775. throw CreateUnknownTypeException(t);
  1776. }
  1777. ob = new System.Xml.Schema.XmlSchemaDocumentation ();
  1778. Reader.MoveToElement();
  1779. while (Reader.MoveToNextAttribute())
  1780. {
  1781. if (Reader.LocalName == "source" && Reader.NamespaceURI == "") {
  1782. ob.@Source = Reader.Value;
  1783. }
  1784. else if (Reader.LocalName == "xml_x003A_lang" && Reader.NamespaceURI == "") {
  1785. ob.@Language = Reader.Value;
  1786. }
  1787. else if (IsXmlnsAttribute (Reader.Name)) {
  1788. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  1789. if (Reader.Prefix == "xmlns")
  1790. [email protected] (Reader.LocalName, Reader.Value);
  1791. else
  1792. [email protected] ("", Reader.Value);
  1793. }
  1794. else {
  1795. #if NET_2_0
  1796. ServiceDescription.AddUnknownAttribute ((XmlAttribute) ReadXmlNode (false));
  1797. #else
  1798. UnknownNode (ob);
  1799. #endif
  1800. }
  1801. }
  1802. #if NET_2_0
  1803. ServiceDescription.SetExtensibleAttributes (ob);
  1804. #endif
  1805. Reader.MoveToElement();
  1806. if (Reader.IsEmptyElement) {
  1807. Reader.Skip ();
  1808. return ob;
  1809. }
  1810. Reader.ReadStartElement();
  1811. Reader.MoveToContent();
  1812. bool b65=false;
  1813. System.Xml.XmlNode[] o67;
  1814. o67 = null;
  1815. int n66=0;
  1816. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  1817. {
  1818. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  1819. {
  1820. o67 = (System.Xml.XmlNode[]) EnsureArrayIndex (o67, n66, typeof(System.Xml.XmlNode));
  1821. o67[n66] = ReadXmlNode (false);
  1822. n66++;
  1823. }
  1824. else if (Reader.NodeType == System.Xml.XmlNodeType.Text)
  1825. {
  1826. o67 = (System.Xml.XmlNode[]) EnsureArrayIndex (o67, n66, typeof(System.Xml.XmlNode));
  1827. o67[n66] = ReadXmlNode (false);
  1828. n66++;
  1829. }
  1830. else
  1831. UnknownNode(ob);
  1832. Reader.MoveToContent();
  1833. }
  1834. o67 = (System.Xml.XmlNode[]) ShrinkArray (o67, n66, typeof(System.Xml.XmlNode), true);
  1835. ob.@Markup = o67;
  1836. ReadEndElement();
  1837. return ob;
  1838. }
  1839. public System.Xml.Schema.XmlSchemaAppInfo ReadObject_XmlSchemaAppInfo (bool isNullable, bool checkType)
  1840. {
  1841. System.Xml.Schema.XmlSchemaAppInfo ob = null;
  1842. if (isNullable && ReadNull()) return null;
  1843. if (checkType)
  1844. {
  1845. System.Xml.XmlQualifiedName t = GetXsiType();
  1846. if (t == null)
  1847. { }
  1848. else if (t.Name != "XmlSchemaAppInfo" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  1849. throw CreateUnknownTypeException(t);
  1850. }
  1851. ob = new System.Xml.Schema.XmlSchemaAppInfo ();
  1852. Reader.MoveToElement();
  1853. while (Reader.MoveToNextAttribute())
  1854. {
  1855. if (Reader.LocalName == "source" && Reader.NamespaceURI == "") {
  1856. ob.@Source = Reader.Value;
  1857. }
  1858. else if (IsXmlnsAttribute (Reader.Name)) {
  1859. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  1860. if (Reader.Prefix == "xmlns")
  1861. [email protected] (Reader.LocalName, Reader.Value);
  1862. else
  1863. [email protected] ("", Reader.Value);
  1864. }
  1865. else {
  1866. #if NET_2_0
  1867. ServiceDescription.AddUnknownAttribute ((XmlAttribute) ReadXmlNode (false));
  1868. #else
  1869. UnknownNode (ob);
  1870. #endif
  1871. }
  1872. }
  1873. #if NET_2_0
  1874. ServiceDescription.SetExtensibleAttributes (ob);
  1875. #endif
  1876. Reader.MoveToElement();
  1877. if (Reader.IsEmptyElement) {
  1878. Reader.Skip ();
  1879. return ob;
  1880. }
  1881. Reader.ReadStartElement();
  1882. Reader.MoveToContent();
  1883. bool b68=false;
  1884. System.Xml.XmlNode[] o70;
  1885. o70 = null;
  1886. int n69=0;
  1887. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  1888. {
  1889. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  1890. {
  1891. o70 = (System.Xml.XmlNode[]) EnsureArrayIndex (o70, n69, typeof(System.Xml.XmlNode));
  1892. o70[n69] = ReadXmlNode (false);
  1893. n69++;
  1894. }
  1895. else if (Reader.NodeType == System.Xml.XmlNodeType.Text)
  1896. {
  1897. o70 = (System.Xml.XmlNode[]) EnsureArrayIndex (o70, n69, typeof(System.Xml.XmlNode));
  1898. o70[n69] = ReadXmlNode (false);
  1899. n69++;
  1900. }
  1901. else
  1902. UnknownNode(ob);
  1903. Reader.MoveToContent();
  1904. }
  1905. o70 = (System.Xml.XmlNode[]) ShrinkArray (o70, n69, typeof(System.Xml.XmlNode), true);
  1906. ob.@Markup = o70;
  1907. ReadEndElement();
  1908. return ob;
  1909. }
  1910. public System.Xml.Schema.XmlSchemaAnnotation ReadObject_XmlSchemaAnnotation (bool isNullable, bool checkType)
  1911. {
  1912. System.Xml.Schema.XmlSchemaAnnotation ob = null;
  1913. if (isNullable && ReadNull()) return null;
  1914. if (checkType)
  1915. {
  1916. System.Xml.XmlQualifiedName t = GetXsiType();
  1917. if (t == null)
  1918. { }
  1919. else if (t.Name != "XmlSchemaAnnotation" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  1920. throw CreateUnknownTypeException(t);
  1921. }
  1922. ob = new System.Xml.Schema.XmlSchemaAnnotation ();
  1923. Reader.MoveToElement();
  1924. int anyAttributeIndex = 0;
  1925. System.Xml.XmlAttribute[] anyAttributeArray = null;
  1926. while (Reader.MoveToNextAttribute())
  1927. {
  1928. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  1929. ob.@Id = Reader.Value;
  1930. }
  1931. else if (IsXmlnsAttribute (Reader.Name)) {
  1932. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  1933. if (Reader.Prefix == "xmlns")
  1934. [email protected] (Reader.LocalName, Reader.Value);
  1935. else
  1936. [email protected] ("", Reader.Value);
  1937. }
  1938. else {
  1939. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  1940. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  1941. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  1942. anyAttributeIndex++;
  1943. }
  1944. }
  1945. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  1946. ob.@UnhandledAttributes = anyAttributeArray;
  1947. #if NET_2_0
  1948. ServiceDescription.SetExtensibleAttributes (ob);
  1949. #endif
  1950. Reader.MoveToElement();
  1951. if (Reader.IsEmptyElement) {
  1952. Reader.Skip ();
  1953. return ob;
  1954. }
  1955. Reader.ReadStartElement();
  1956. Reader.MoveToContent();
  1957. bool b71=false;
  1958. System.Xml.Schema.XmlSchemaObjectCollection o73;
  1959. o73 = ob.@Items;
  1960. int n72=0;
  1961. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  1962. {
  1963. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  1964. {
  1965. if (Reader.LocalName == "documentation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b71) {
  1966. if (((object)o73) == null)
  1967. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  1968. o73.Add (ReadObject_XmlSchemaDocumentation (false, true));
  1969. n72++;
  1970. }
  1971. else if (Reader.LocalName == "appinfo" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b71) {
  1972. if (((object)o73) == null)
  1973. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  1974. o73.Add (ReadObject_XmlSchemaAppInfo (false, true));
  1975. n72++;
  1976. }
  1977. else {
  1978. UnknownNode (ob);
  1979. }
  1980. }
  1981. else
  1982. UnknownNode(ob);
  1983. Reader.MoveToContent();
  1984. }
  1985. ReadEndElement();
  1986. return ob;
  1987. }
  1988. public System.Xml.Schema.XmlSchemaAnnotated ReadObject_XmlSchemaAnnotated (bool isNullable, bool checkType)
  1989. {
  1990. System.Xml.Schema.XmlSchemaAnnotated ob = null;
  1991. if (isNullable && ReadNull()) return null;
  1992. if (checkType)
  1993. {
  1994. System.Xml.XmlQualifiedName t = GetXsiType();
  1995. if (t == null)
  1996. { }
  1997. else if (t.Name == "XmlSchemaAttributeGroupRef" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  1998. return ReadObject_XmlSchemaAttributeGroupRef (isNullable, checkType);
  1999. else if (t.Name == "XmlSchemaType" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2000. return ReadObject_XmlSchemaType (isNullable, checkType);
  2001. else if (t.Name == "XmlSchemaSimpleTypeContent" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2002. return ReadObject_XmlSchemaSimpleTypeContent (isNullable, checkType);
  2003. else if (t.Name == "XmlSchemaSimpleTypeUnion" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2004. return ReadObject_XmlSchemaSimpleTypeUnion (isNullable, checkType);
  2005. else if (t.Name == "XmlSchemaSimpleTypeList" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2006. return ReadObject_XmlSchemaSimpleTypeList (isNullable, checkType);
  2007. else if (t.Name == "XmlSchemaFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2008. return ReadObject_XmlSchemaFacet (isNullable, checkType);
  2009. else if (t.Name == "XmlSchemaPatternFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2010. return ReadObject_XmlSchemaPatternFacet (isNullable, checkType);
  2011. else if (t.Name == "XmlSchemaWhiteSpaceFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2012. return ReadObject_XmlSchemaWhiteSpaceFacet (isNullable, checkType);
  2013. else if (t.Name == "XmlSchemaEnumerationFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2014. return ReadObject_XmlSchemaEnumerationFacet (isNullable, checkType);
  2015. else if (t.Name == "XmlSchemaNumericFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2016. return ReadObject_XmlSchemaNumericFacet (isNullable, checkType);
  2017. else if (t.Name == "XmlSchemaMaxLengthFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2018. return ReadObject_XmlSchemaMaxLengthFacet (isNullable, checkType);
  2019. else if (t.Name == "XmlSchemaMinLengthFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2020. return ReadObject_XmlSchemaMinLengthFacet (isNullable, checkType);
  2021. else if (t.Name == "XmlSchemaLengthFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2022. return ReadObject_XmlSchemaLengthFacet (isNullable, checkType);
  2023. else if (t.Name == "XmlSchemaFractionDigitsFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2024. return ReadObject_XmlSchemaFractionDigitsFacet (isNullable, checkType);
  2025. else if (t.Name == "XmlSchemaTotalDigitsFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2026. return ReadObject_XmlSchemaTotalDigitsFacet (isNullable, checkType);
  2027. else if (t.Name == "XmlSchemaMaxInclusiveFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2028. return ReadObject_XmlSchemaMaxInclusiveFacet (isNullable, checkType);
  2029. else if (t.Name == "XmlSchemaMaxExclusiveFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2030. return ReadObject_XmlSchemaMaxExclusiveFacet (isNullable, checkType);
  2031. else if (t.Name == "XmlSchemaMinInclusiveFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2032. return ReadObject_XmlSchemaMinInclusiveFacet (isNullable, checkType);
  2033. else if (t.Name == "XmlSchemaMinExclusiveFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2034. return ReadObject_XmlSchemaMinExclusiveFacet (isNullable, checkType);
  2035. else if (t.Name == "XmlSchemaSimpleTypeRestriction" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2036. return ReadObject_XmlSchemaSimpleTypeRestriction (isNullable, checkType);
  2037. else if (t.Name == "XmlSchemaSimpleType" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2038. return ReadObject_XmlSchemaSimpleType (isNullable, checkType);
  2039. else if (t.Name == "XmlSchemaAttribute" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2040. return ReadObject_XmlSchemaAttribute (isNullable, checkType);
  2041. else if (t.Name == "XmlSchemaAnyAttribute" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2042. return ReadObject_XmlSchemaAnyAttribute (isNullable, checkType);
  2043. else if (t.Name == "XmlSchemaAttributeGroup" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2044. return ReadObject_XmlSchemaAttributeGroup (isNullable, checkType);
  2045. else if (t.Name == "XmlSchemaParticle" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2046. return ReadObject_XmlSchemaParticle (isNullable, checkType);
  2047. else if (t.Name == "XmlSchemaAny" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2048. return ReadObject_XmlSchemaAny (isNullable, checkType);
  2049. else if (t.Name == "XmlSchemaGroupRef" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2050. return ReadObject_XmlSchemaGroupRef (isNullable, checkType);
  2051. else if (t.Name == "XmlSchemaGroupBase" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2052. return ReadObject_XmlSchemaGroupBase (isNullable, checkType);
  2053. else if (t.Name == "XmlSchemaAll" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2054. return ReadObject_XmlSchemaAll (isNullable, checkType);
  2055. else if (t.Name == "XmlSchemaContent" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2056. return ReadObject_XmlSchemaContent (isNullable, checkType);
  2057. else if (t.Name == "XmlSchemaComplexContentExtension" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2058. return ReadObject_XmlSchemaComplexContentExtension (isNullable, checkType);
  2059. else if (t.Name == "XmlSchemaComplexContentRestriction" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2060. return ReadObject_XmlSchemaComplexContentRestriction (isNullable, checkType);
  2061. else if (t.Name == "XmlSchemaContentModel" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2062. return ReadObject_XmlSchemaContentModel (isNullable, checkType);
  2063. else if (t.Name == "XmlSchemaComplexContent" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2064. return ReadObject_XmlSchemaComplexContent (isNullable, checkType);
  2065. else if (t.Name == "XmlSchemaSimpleContentExtension" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2066. return ReadObject_XmlSchemaSimpleContentExtension (isNullable, checkType);
  2067. else if (t.Name == "XmlSchemaSimpleContentRestriction" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2068. return ReadObject_XmlSchemaSimpleContentRestriction (isNullable, checkType);
  2069. else if (t.Name == "XmlSchemaSimpleContent" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2070. return ReadObject_XmlSchemaSimpleContent (isNullable, checkType);
  2071. else if (t.Name == "XmlSchemaComplexType" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2072. return ReadObject_XmlSchemaComplexType (isNullable, checkType);
  2073. else if (t.Name == "XmlSchemaXPath" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2074. return ReadObject_XmlSchemaXPath (isNullable, checkType);
  2075. else if (t.Name == "XmlSchemaIdentityConstraint" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2076. return ReadObject_XmlSchemaIdentityConstraint (isNullable, checkType);
  2077. else if (t.Name == "XmlSchemaKeyref" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2078. return ReadObject_XmlSchemaKeyref (isNullable, checkType);
  2079. else if (t.Name == "XmlSchemaKey" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2080. return ReadObject_XmlSchemaKey (isNullable, checkType);
  2081. else if (t.Name == "XmlSchemaUnique" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2082. return ReadObject_XmlSchemaUnique (isNullable, checkType);
  2083. else if (t.Name == "XmlSchemaElement" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2084. return ReadObject_XmlSchemaElement (isNullable, checkType);
  2085. else if (t.Name == "XmlSchemaChoice" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2086. return ReadObject_XmlSchemaChoice (isNullable, checkType);
  2087. else if (t.Name == "XmlSchemaSequence" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2088. return ReadObject_XmlSchemaSequence (isNullable, checkType);
  2089. else if (t.Name == "XmlSchemaGroup" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2090. return ReadObject_XmlSchemaGroup (isNullable, checkType);
  2091. else if (t.Name == "XmlSchemaNotation" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2092. return ReadObject_XmlSchemaNotation (isNullable, checkType);
  2093. else if (t.Name != "XmlSchemaAnnotated" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  2094. throw CreateUnknownTypeException(t);
  2095. }
  2096. ob = new System.Xml.Schema.XmlSchemaAnnotated ();
  2097. Reader.MoveToElement();
  2098. int anyAttributeIndex = 0;
  2099. System.Xml.XmlAttribute[] anyAttributeArray = null;
  2100. while (Reader.MoveToNextAttribute())
  2101. {
  2102. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  2103. ob.@Id = Reader.Value;
  2104. }
  2105. else if (IsXmlnsAttribute (Reader.Name)) {
  2106. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  2107. if (Reader.Prefix == "xmlns")
  2108. [email protected] (Reader.LocalName, Reader.Value);
  2109. else
  2110. [email protected] ("", Reader.Value);
  2111. }
  2112. else {
  2113. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  2114. ParseWsdlArrayType (attr);
  2115. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  2116. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  2117. anyAttributeIndex++;
  2118. }
  2119. }
  2120. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  2121. ob.@UnhandledAttributes = anyAttributeArray;
  2122. #if NET_2_0
  2123. ServiceDescription.SetExtensibleAttributes (ob);
  2124. #endif
  2125. Reader.MoveToElement();
  2126. if (Reader.IsEmptyElement) {
  2127. Reader.Skip ();
  2128. return ob;
  2129. }
  2130. Reader.ReadStartElement();
  2131. Reader.MoveToContent();
  2132. bool b74=false;
  2133. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  2134. {
  2135. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  2136. {
  2137. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b74) {
  2138. b74 = true;
  2139. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  2140. }
  2141. else {
  2142. UnknownNode (ob);
  2143. }
  2144. }
  2145. else
  2146. UnknownNode(ob);
  2147. Reader.MoveToContent();
  2148. }
  2149. ReadEndElement();
  2150. return ob;
  2151. }
  2152. public System.Xml.Schema.XmlSchemaAttributeGroupRef ReadObject_XmlSchemaAttributeGroupRef (bool isNullable, bool checkType)
  2153. {
  2154. System.Xml.Schema.XmlSchemaAttributeGroupRef ob = null;
  2155. if (isNullable && ReadNull()) return null;
  2156. if (checkType)
  2157. {
  2158. System.Xml.XmlQualifiedName t = GetXsiType();
  2159. if (t == null)
  2160. { }
  2161. else if (t.Name != "XmlSchemaAttributeGroupRef" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  2162. throw CreateUnknownTypeException(t);
  2163. }
  2164. ob = new System.Xml.Schema.XmlSchemaAttributeGroupRef ();
  2165. Reader.MoveToElement();
  2166. int anyAttributeIndex = 0;
  2167. System.Xml.XmlAttribute[] anyAttributeArray = null;
  2168. while (Reader.MoveToNextAttribute())
  2169. {
  2170. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  2171. ob.@Id = Reader.Value;
  2172. }
  2173. else if (Reader.LocalName == "ref" && Reader.NamespaceURI == "") {
  2174. ob.@RefName = ToXmlQualifiedName (Reader.Value);
  2175. }
  2176. else if (IsXmlnsAttribute (Reader.Name)) {
  2177. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  2178. if (Reader.Prefix == "xmlns")
  2179. [email protected] (Reader.LocalName, Reader.Value);
  2180. else
  2181. [email protected] ("", Reader.Value);
  2182. }
  2183. else {
  2184. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  2185. ParseWsdlArrayType (attr);
  2186. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  2187. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  2188. anyAttributeIndex++;
  2189. }
  2190. }
  2191. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  2192. ob.@UnhandledAttributes = anyAttributeArray;
  2193. #if NET_2_0
  2194. ServiceDescription.SetExtensibleAttributes (ob);
  2195. #endif
  2196. Reader.MoveToElement();
  2197. if (Reader.IsEmptyElement) {
  2198. Reader.Skip ();
  2199. return ob;
  2200. }
  2201. Reader.ReadStartElement();
  2202. Reader.MoveToContent();
  2203. bool b75=false;
  2204. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  2205. {
  2206. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  2207. {
  2208. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b75) {
  2209. b75 = true;
  2210. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  2211. }
  2212. else {
  2213. UnknownNode (ob);
  2214. }
  2215. }
  2216. else
  2217. UnknownNode(ob);
  2218. Reader.MoveToContent();
  2219. }
  2220. ReadEndElement();
  2221. return ob;
  2222. }
  2223. public System.Xml.Schema.XmlSchemaType ReadObject_XmlSchemaType (bool isNullable, bool checkType)
  2224. {
  2225. System.Xml.Schema.XmlSchemaType ob = null;
  2226. if (isNullable && ReadNull()) return null;
  2227. if (checkType)
  2228. {
  2229. System.Xml.XmlQualifiedName t = GetXsiType();
  2230. if (t == null)
  2231. { }
  2232. else if (t.Name == "XmlSchemaSimpleType" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2233. return ReadObject_XmlSchemaSimpleType (isNullable, checkType);
  2234. else if (t.Name == "XmlSchemaComplexType" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2235. return ReadObject_XmlSchemaComplexType (isNullable, checkType);
  2236. else if (t.Name != "XmlSchemaType" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  2237. throw CreateUnknownTypeException(t);
  2238. }
  2239. ob = new System.Xml.Schema.XmlSchemaType ();
  2240. Reader.MoveToElement();
  2241. ob.@Final = ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None);
  2242. int anyAttributeIndex = 0;
  2243. System.Xml.XmlAttribute[] anyAttributeArray = null;
  2244. while (Reader.MoveToNextAttribute())
  2245. {
  2246. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  2247. ob.@Id = Reader.Value;
  2248. }
  2249. else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  2250. ob.@Name = Reader.Value;
  2251. }
  2252. else if (Reader.LocalName == "final" && Reader.NamespaceURI == "") {
  2253. ob.@Final = GetEnumValue_XmlSchemaDerivationMethod (Reader.Value);
  2254. }
  2255. else if (IsXmlnsAttribute (Reader.Name)) {
  2256. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  2257. if (Reader.Prefix == "xmlns")
  2258. [email protected] (Reader.LocalName, Reader.Value);
  2259. else
  2260. [email protected] ("", Reader.Value);
  2261. }
  2262. else {
  2263. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  2264. ParseWsdlArrayType (attr);
  2265. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  2266. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  2267. anyAttributeIndex++;
  2268. }
  2269. }
  2270. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  2271. ob.@UnhandledAttributes = anyAttributeArray;
  2272. #if NET_2_0
  2273. ServiceDescription.SetExtensibleAttributes (ob);
  2274. #endif
  2275. Reader.MoveToElement();
  2276. if (Reader.IsEmptyElement) {
  2277. Reader.Skip ();
  2278. return ob;
  2279. }
  2280. Reader.ReadStartElement();
  2281. Reader.MoveToContent();
  2282. bool b76=false;
  2283. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  2284. {
  2285. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  2286. {
  2287. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b76) {
  2288. b76 = true;
  2289. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  2290. }
  2291. else {
  2292. UnknownNode (ob);
  2293. }
  2294. }
  2295. else
  2296. UnknownNode(ob);
  2297. Reader.MoveToContent();
  2298. }
  2299. ReadEndElement();
  2300. return ob;
  2301. }
  2302. public System.Xml.XmlQualifiedName[] ReadObject_ArrayOfQName (bool isNullable, bool checkType)
  2303. {
  2304. System.Xml.XmlQualifiedName[] o77 = null;
  2305. if (!ReadNull()) {
  2306. o77 = (System.Xml.XmlQualifiedName[]) EnsureArrayIndex (null, 0, typeof(System.Xml.XmlQualifiedName));
  2307. if (Reader.IsEmptyElement) {
  2308. Reader.Skip();
  2309. o77 = (System.Xml.XmlQualifiedName[]) ShrinkArray (o77, 0, typeof(System.Xml.XmlQualifiedName), false);
  2310. } else {
  2311. int n78 = 0;
  2312. Reader.ReadStartElement();
  2313. Reader.MoveToContent();
  2314. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  2315. {
  2316. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  2317. {
  2318. if (Reader.LocalName == "QName" && Reader.NamespaceURI == "") {
  2319. o77 = (System.Xml.XmlQualifiedName[]) EnsureArrayIndex (o77, n78, typeof(System.Xml.XmlQualifiedName));
  2320. o77[n78] = ReadElementQualifiedName ();
  2321. n78++;
  2322. }
  2323. else UnknownNode (null);
  2324. }
  2325. else UnknownNode (null);
  2326. Reader.MoveToContent();
  2327. }
  2328. ReadEndElement();
  2329. o77 = (System.Xml.XmlQualifiedName[]) ShrinkArray (o77, n78, typeof(System.Xml.XmlQualifiedName), false);
  2330. }
  2331. }
  2332. return o77;
  2333. }
  2334. public System.Xml.Schema.XmlSchemaSimpleTypeContent ReadObject_XmlSchemaSimpleTypeContent (bool isNullable, bool checkType)
  2335. {
  2336. System.Xml.Schema.XmlSchemaSimpleTypeContent ob = null;
  2337. if (isNullable && ReadNull()) return null;
  2338. if (checkType)
  2339. {
  2340. System.Xml.XmlQualifiedName t = GetXsiType();
  2341. if (t == null)
  2342. { }
  2343. else if (t.Name == "XmlSchemaSimpleTypeUnion" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2344. return ReadObject_XmlSchemaSimpleTypeUnion (isNullable, checkType);
  2345. else if (t.Name == "XmlSchemaSimpleTypeList" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2346. return ReadObject_XmlSchemaSimpleTypeList (isNullable, checkType);
  2347. else if (t.Name == "XmlSchemaSimpleTypeRestriction" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2348. return ReadObject_XmlSchemaSimpleTypeRestriction (isNullable, checkType);
  2349. else if (t.Name != "XmlSchemaSimpleTypeContent" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  2350. throw CreateUnknownTypeException(t);
  2351. }
  2352. return ob;
  2353. }
  2354. public System.Xml.Schema.XmlSchemaSimpleTypeUnion ReadObject_XmlSchemaSimpleTypeUnion (bool isNullable, bool checkType)
  2355. {
  2356. System.Xml.Schema.XmlSchemaSimpleTypeUnion ob = null;
  2357. if (isNullable && ReadNull()) return null;
  2358. if (checkType)
  2359. {
  2360. System.Xml.XmlQualifiedName t = GetXsiType();
  2361. if (t == null)
  2362. { }
  2363. else if (t.Name != "XmlSchemaSimpleTypeUnion" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  2364. throw CreateUnknownTypeException(t);
  2365. }
  2366. ob = new System.Xml.Schema.XmlSchemaSimpleTypeUnion ();
  2367. Reader.MoveToElement();
  2368. int anyAttributeIndex = 0;
  2369. System.Xml.XmlAttribute[] anyAttributeArray = null;
  2370. while (Reader.MoveToNextAttribute())
  2371. {
  2372. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  2373. ob.@Id = Reader.Value;
  2374. }
  2375. else if (Reader.LocalName == "memberTypes" && Reader.NamespaceURI == "") {
  2376. System.Xml.XmlQualifiedName[] o79;
  2377. string s80 = Reader.Value.Trim();
  2378. if (s80 != string.Empty) {
  2379. string[] o81 = s80.Split (' ');
  2380. o79 = new System.Xml.XmlQualifiedName [o81.Length];
  2381. for (int n82 = 0; n82 < o81.Length; n82++)
  2382. o79[n82] = ToXmlQualifiedName (o81[n82]);
  2383. }
  2384. else
  2385. o79 = new System.Xml.XmlQualifiedName [0];
  2386. ob.@MemberTypes = o79;
  2387. }
  2388. else if (IsXmlnsAttribute (Reader.Name)) {
  2389. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  2390. if (Reader.Prefix == "xmlns")
  2391. [email protected] (Reader.LocalName, Reader.Value);
  2392. else
  2393. [email protected] ("", Reader.Value);
  2394. }
  2395. else {
  2396. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  2397. ParseWsdlArrayType (attr);
  2398. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  2399. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  2400. anyAttributeIndex++;
  2401. }
  2402. }
  2403. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  2404. ob.@UnhandledAttributes = anyAttributeArray;
  2405. #if NET_2_0
  2406. ServiceDescription.SetExtensibleAttributes (ob);
  2407. #endif
  2408. Reader.MoveToElement();
  2409. if (Reader.IsEmptyElement) {
  2410. Reader.Skip ();
  2411. return ob;
  2412. }
  2413. Reader.ReadStartElement();
  2414. Reader.MoveToContent();
  2415. bool b83=false, b84=false;
  2416. System.Xml.Schema.XmlSchemaObjectCollection o86;
  2417. o86 = ob.@BaseTypes;
  2418. int n85=0;
  2419. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  2420. {
  2421. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  2422. {
  2423. if (Reader.LocalName == "simpleType" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b84) {
  2424. if (((object)o86) == null)
  2425. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  2426. o86.Add (ReadObject_XmlSchemaSimpleType (false, true));
  2427. n85++;
  2428. }
  2429. else if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b83) {
  2430. b83 = true;
  2431. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  2432. }
  2433. else {
  2434. UnknownNode (ob);
  2435. }
  2436. }
  2437. else
  2438. UnknownNode(ob);
  2439. Reader.MoveToContent();
  2440. }
  2441. ReadEndElement();
  2442. return ob;
  2443. }
  2444. public System.Xml.Schema.XmlSchemaSimpleTypeList ReadObject_XmlSchemaSimpleTypeList (bool isNullable, bool checkType)
  2445. {
  2446. System.Xml.Schema.XmlSchemaSimpleTypeList ob = null;
  2447. if (isNullable && ReadNull()) return null;
  2448. if (checkType)
  2449. {
  2450. System.Xml.XmlQualifiedName t = GetXsiType();
  2451. if (t == null)
  2452. { }
  2453. else if (t.Name != "XmlSchemaSimpleTypeList" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  2454. throw CreateUnknownTypeException(t);
  2455. }
  2456. ob = new System.Xml.Schema.XmlSchemaSimpleTypeList ();
  2457. Reader.MoveToElement();
  2458. int anyAttributeIndex = 0;
  2459. System.Xml.XmlAttribute[] anyAttributeArray = null;
  2460. while (Reader.MoveToNextAttribute())
  2461. {
  2462. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  2463. ob.@Id = Reader.Value;
  2464. }
  2465. else if (Reader.LocalName == "itemType" && Reader.NamespaceURI == "") {
  2466. ob.@ItemTypeName = ToXmlQualifiedName (Reader.Value);
  2467. }
  2468. else if (IsXmlnsAttribute (Reader.Name)) {
  2469. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  2470. if (Reader.Prefix == "xmlns")
  2471. [email protected] (Reader.LocalName, Reader.Value);
  2472. else
  2473. [email protected] ("", Reader.Value);
  2474. }
  2475. else {
  2476. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  2477. ParseWsdlArrayType (attr);
  2478. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  2479. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  2480. anyAttributeIndex++;
  2481. }
  2482. }
  2483. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  2484. ob.@UnhandledAttributes = anyAttributeArray;
  2485. #if NET_2_0
  2486. ServiceDescription.SetExtensibleAttributes (ob);
  2487. #endif
  2488. Reader.MoveToElement();
  2489. if (Reader.IsEmptyElement) {
  2490. Reader.Skip ();
  2491. return ob;
  2492. }
  2493. Reader.ReadStartElement();
  2494. Reader.MoveToContent();
  2495. bool b87=false, b88=false;
  2496. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  2497. {
  2498. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  2499. {
  2500. if (Reader.LocalName == "simpleType" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b88) {
  2501. b88 = true;
  2502. ob.@ItemType = ReadObject_XmlSchemaSimpleType (false, true);
  2503. }
  2504. else if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b87) {
  2505. b87 = true;
  2506. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  2507. }
  2508. else {
  2509. UnknownNode (ob);
  2510. }
  2511. }
  2512. else
  2513. UnknownNode(ob);
  2514. Reader.MoveToContent();
  2515. }
  2516. ReadEndElement();
  2517. return ob;
  2518. }
  2519. public System.Xml.Schema.XmlSchemaFacet ReadObject_XmlSchemaFacet (bool isNullable, bool checkType)
  2520. {
  2521. System.Xml.Schema.XmlSchemaFacet ob = null;
  2522. if (isNullable && ReadNull()) return null;
  2523. if (checkType)
  2524. {
  2525. System.Xml.XmlQualifiedName t = GetXsiType();
  2526. if (t == null)
  2527. { }
  2528. else if (t.Name == "XmlSchemaPatternFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2529. return ReadObject_XmlSchemaPatternFacet (isNullable, checkType);
  2530. else if (t.Name == "XmlSchemaWhiteSpaceFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2531. return ReadObject_XmlSchemaWhiteSpaceFacet (isNullable, checkType);
  2532. else if (t.Name == "XmlSchemaEnumerationFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2533. return ReadObject_XmlSchemaEnumerationFacet (isNullable, checkType);
  2534. else if (t.Name == "XmlSchemaNumericFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2535. return ReadObject_XmlSchemaNumericFacet (isNullable, checkType);
  2536. else if (t.Name == "XmlSchemaMaxLengthFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2537. return ReadObject_XmlSchemaMaxLengthFacet (isNullable, checkType);
  2538. else if (t.Name == "XmlSchemaMinLengthFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2539. return ReadObject_XmlSchemaMinLengthFacet (isNullable, checkType);
  2540. else if (t.Name == "XmlSchemaLengthFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2541. return ReadObject_XmlSchemaLengthFacet (isNullable, checkType);
  2542. else if (t.Name == "XmlSchemaFractionDigitsFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2543. return ReadObject_XmlSchemaFractionDigitsFacet (isNullable, checkType);
  2544. else if (t.Name == "XmlSchemaTotalDigitsFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2545. return ReadObject_XmlSchemaTotalDigitsFacet (isNullable, checkType);
  2546. else if (t.Name == "XmlSchemaMaxInclusiveFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2547. return ReadObject_XmlSchemaMaxInclusiveFacet (isNullable, checkType);
  2548. else if (t.Name == "XmlSchemaMaxExclusiveFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2549. return ReadObject_XmlSchemaMaxExclusiveFacet (isNullable, checkType);
  2550. else if (t.Name == "XmlSchemaMinInclusiveFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2551. return ReadObject_XmlSchemaMinInclusiveFacet (isNullable, checkType);
  2552. else if (t.Name == "XmlSchemaMinExclusiveFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2553. return ReadObject_XmlSchemaMinExclusiveFacet (isNullable, checkType);
  2554. else if (t.Name != "XmlSchemaFacet" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  2555. throw CreateUnknownTypeException(t);
  2556. }
  2557. return ob;
  2558. }
  2559. public System.Xml.Schema.XmlSchemaPatternFacet ReadObject_XmlSchemaPatternFacet (bool isNullable, bool checkType)
  2560. {
  2561. System.Xml.Schema.XmlSchemaPatternFacet ob = null;
  2562. if (isNullable && ReadNull()) return null;
  2563. if (checkType)
  2564. {
  2565. System.Xml.XmlQualifiedName t = GetXsiType();
  2566. if (t == null)
  2567. { }
  2568. else if (t.Name != "XmlSchemaPatternFacet" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  2569. throw CreateUnknownTypeException(t);
  2570. }
  2571. ob = new System.Xml.Schema.XmlSchemaPatternFacet ();
  2572. Reader.MoveToElement();
  2573. ob.@IsFixed = false;
  2574. int anyAttributeIndex = 0;
  2575. System.Xml.XmlAttribute[] anyAttributeArray = null;
  2576. while (Reader.MoveToNextAttribute())
  2577. {
  2578. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  2579. ob.@Id = Reader.Value;
  2580. }
  2581. else if (Reader.LocalName == "value" && Reader.NamespaceURI == "") {
  2582. ob.@Value = Reader.Value;
  2583. }
  2584. else if (Reader.LocalName == "fixed" && Reader.NamespaceURI == "") {
  2585. ob.@IsFixed = XmlConvert.ToBoolean (Reader.Value);
  2586. }
  2587. else if (IsXmlnsAttribute (Reader.Name)) {
  2588. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  2589. if (Reader.Prefix == "xmlns")
  2590. [email protected] (Reader.LocalName, Reader.Value);
  2591. else
  2592. [email protected] ("", Reader.Value);
  2593. }
  2594. else {
  2595. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  2596. ParseWsdlArrayType (attr);
  2597. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  2598. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  2599. anyAttributeIndex++;
  2600. }
  2601. }
  2602. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  2603. ob.@UnhandledAttributes = anyAttributeArray;
  2604. #if NET_2_0
  2605. ServiceDescription.SetExtensibleAttributes (ob);
  2606. #endif
  2607. Reader.MoveToElement();
  2608. if (Reader.IsEmptyElement) {
  2609. Reader.Skip ();
  2610. return ob;
  2611. }
  2612. Reader.ReadStartElement();
  2613. Reader.MoveToContent();
  2614. bool b89=false;
  2615. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  2616. {
  2617. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  2618. {
  2619. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b89) {
  2620. b89 = true;
  2621. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  2622. }
  2623. else {
  2624. UnknownNode (ob);
  2625. }
  2626. }
  2627. else
  2628. UnknownNode(ob);
  2629. Reader.MoveToContent();
  2630. }
  2631. ReadEndElement();
  2632. return ob;
  2633. }
  2634. public System.Xml.Schema.XmlSchemaWhiteSpaceFacet ReadObject_XmlSchemaWhiteSpaceFacet (bool isNullable, bool checkType)
  2635. {
  2636. System.Xml.Schema.XmlSchemaWhiteSpaceFacet ob = null;
  2637. if (isNullable && ReadNull()) return null;
  2638. if (checkType)
  2639. {
  2640. System.Xml.XmlQualifiedName t = GetXsiType();
  2641. if (t == null)
  2642. { }
  2643. else if (t.Name != "XmlSchemaWhiteSpaceFacet" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  2644. throw CreateUnknownTypeException(t);
  2645. }
  2646. ob = new System.Xml.Schema.XmlSchemaWhiteSpaceFacet ();
  2647. Reader.MoveToElement();
  2648. ob.@IsFixed = false;
  2649. int anyAttributeIndex = 0;
  2650. System.Xml.XmlAttribute[] anyAttributeArray = null;
  2651. while (Reader.MoveToNextAttribute())
  2652. {
  2653. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  2654. ob.@Id = Reader.Value;
  2655. }
  2656. else if (Reader.LocalName == "value" && Reader.NamespaceURI == "") {
  2657. ob.@Value = Reader.Value;
  2658. }
  2659. else if (Reader.LocalName == "fixed" && Reader.NamespaceURI == "") {
  2660. ob.@IsFixed = XmlConvert.ToBoolean (Reader.Value);
  2661. }
  2662. else if (IsXmlnsAttribute (Reader.Name)) {
  2663. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  2664. if (Reader.Prefix == "xmlns")
  2665. [email protected] (Reader.LocalName, Reader.Value);
  2666. else
  2667. [email protected] ("", Reader.Value);
  2668. }
  2669. else {
  2670. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  2671. ParseWsdlArrayType (attr);
  2672. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  2673. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  2674. anyAttributeIndex++;
  2675. }
  2676. }
  2677. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  2678. ob.@UnhandledAttributes = anyAttributeArray;
  2679. #if NET_2_0
  2680. ServiceDescription.SetExtensibleAttributes (ob);
  2681. #endif
  2682. Reader.MoveToElement();
  2683. if (Reader.IsEmptyElement) {
  2684. Reader.Skip ();
  2685. return ob;
  2686. }
  2687. Reader.ReadStartElement();
  2688. Reader.MoveToContent();
  2689. bool b90=false;
  2690. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  2691. {
  2692. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  2693. {
  2694. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b90) {
  2695. b90 = true;
  2696. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  2697. }
  2698. else {
  2699. UnknownNode (ob);
  2700. }
  2701. }
  2702. else
  2703. UnknownNode(ob);
  2704. Reader.MoveToContent();
  2705. }
  2706. ReadEndElement();
  2707. return ob;
  2708. }
  2709. public System.Xml.Schema.XmlSchemaEnumerationFacet ReadObject_XmlSchemaEnumerationFacet (bool isNullable, bool checkType)
  2710. {
  2711. System.Xml.Schema.XmlSchemaEnumerationFacet ob = null;
  2712. if (isNullable && ReadNull()) return null;
  2713. if (checkType)
  2714. {
  2715. System.Xml.XmlQualifiedName t = GetXsiType();
  2716. if (t == null)
  2717. { }
  2718. else if (t.Name != "XmlSchemaEnumerationFacet" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  2719. throw CreateUnknownTypeException(t);
  2720. }
  2721. ob = new System.Xml.Schema.XmlSchemaEnumerationFacet ();
  2722. Reader.MoveToElement();
  2723. ob.@IsFixed = false;
  2724. int anyAttributeIndex = 0;
  2725. System.Xml.XmlAttribute[] anyAttributeArray = null;
  2726. while (Reader.MoveToNextAttribute())
  2727. {
  2728. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  2729. ob.@Id = Reader.Value;
  2730. }
  2731. else if (Reader.LocalName == "value" && Reader.NamespaceURI == "") {
  2732. ob.@Value = Reader.Value;
  2733. }
  2734. else if (Reader.LocalName == "fixed" && Reader.NamespaceURI == "") {
  2735. ob.@IsFixed = XmlConvert.ToBoolean (Reader.Value);
  2736. }
  2737. else if (IsXmlnsAttribute (Reader.Name)) {
  2738. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  2739. if (Reader.Prefix == "xmlns")
  2740. [email protected] (Reader.LocalName, Reader.Value);
  2741. else
  2742. [email protected] ("", Reader.Value);
  2743. }
  2744. else {
  2745. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  2746. ParseWsdlArrayType (attr);
  2747. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  2748. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  2749. anyAttributeIndex++;
  2750. }
  2751. }
  2752. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  2753. ob.@UnhandledAttributes = anyAttributeArray;
  2754. #if NET_2_0
  2755. ServiceDescription.SetExtensibleAttributes (ob);
  2756. #endif
  2757. Reader.MoveToElement();
  2758. if (Reader.IsEmptyElement) {
  2759. Reader.Skip ();
  2760. return ob;
  2761. }
  2762. Reader.ReadStartElement();
  2763. Reader.MoveToContent();
  2764. bool b91=false;
  2765. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  2766. {
  2767. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  2768. {
  2769. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b91) {
  2770. b91 = true;
  2771. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  2772. }
  2773. else {
  2774. UnknownNode (ob);
  2775. }
  2776. }
  2777. else
  2778. UnknownNode(ob);
  2779. Reader.MoveToContent();
  2780. }
  2781. ReadEndElement();
  2782. return ob;
  2783. }
  2784. public System.Xml.Schema.XmlSchemaNumericFacet ReadObject_XmlSchemaNumericFacet (bool isNullable, bool checkType)
  2785. {
  2786. System.Xml.Schema.XmlSchemaNumericFacet ob = null;
  2787. if (isNullable && ReadNull()) return null;
  2788. if (checkType)
  2789. {
  2790. System.Xml.XmlQualifiedName t = GetXsiType();
  2791. if (t == null)
  2792. { }
  2793. else if (t.Name == "XmlSchemaMaxLengthFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2794. return ReadObject_XmlSchemaMaxLengthFacet (isNullable, checkType);
  2795. else if (t.Name == "XmlSchemaMinLengthFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2796. return ReadObject_XmlSchemaMinLengthFacet (isNullable, checkType);
  2797. else if (t.Name == "XmlSchemaLengthFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2798. return ReadObject_XmlSchemaLengthFacet (isNullable, checkType);
  2799. else if (t.Name == "XmlSchemaFractionDigitsFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2800. return ReadObject_XmlSchemaFractionDigitsFacet (isNullable, checkType);
  2801. else if (t.Name == "XmlSchemaTotalDigitsFacet" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  2802. return ReadObject_XmlSchemaTotalDigitsFacet (isNullable, checkType);
  2803. else if (t.Name != "XmlSchemaNumericFacet" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  2804. throw CreateUnknownTypeException(t);
  2805. }
  2806. return ob;
  2807. }
  2808. public System.Xml.Schema.XmlSchemaMaxLengthFacet ReadObject_XmlSchemaMaxLengthFacet (bool isNullable, bool checkType)
  2809. {
  2810. System.Xml.Schema.XmlSchemaMaxLengthFacet ob = null;
  2811. if (isNullable && ReadNull()) return null;
  2812. if (checkType)
  2813. {
  2814. System.Xml.XmlQualifiedName t = GetXsiType();
  2815. if (t == null)
  2816. { }
  2817. else if (t.Name != "XmlSchemaMaxLengthFacet" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  2818. throw CreateUnknownTypeException(t);
  2819. }
  2820. ob = new System.Xml.Schema.XmlSchemaMaxLengthFacet ();
  2821. Reader.MoveToElement();
  2822. ob.@IsFixed = false;
  2823. int anyAttributeIndex = 0;
  2824. System.Xml.XmlAttribute[] anyAttributeArray = null;
  2825. while (Reader.MoveToNextAttribute())
  2826. {
  2827. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  2828. ob.@Id = Reader.Value;
  2829. }
  2830. else if (Reader.LocalName == "value" && Reader.NamespaceURI == "") {
  2831. ob.@Value = Reader.Value;
  2832. }
  2833. else if (Reader.LocalName == "fixed" && Reader.NamespaceURI == "") {
  2834. ob.@IsFixed = XmlConvert.ToBoolean (Reader.Value);
  2835. }
  2836. else if (IsXmlnsAttribute (Reader.Name)) {
  2837. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  2838. if (Reader.Prefix == "xmlns")
  2839. [email protected] (Reader.LocalName, Reader.Value);
  2840. else
  2841. [email protected] ("", Reader.Value);
  2842. }
  2843. else {
  2844. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  2845. ParseWsdlArrayType (attr);
  2846. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  2847. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  2848. anyAttributeIndex++;
  2849. }
  2850. }
  2851. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  2852. ob.@UnhandledAttributes = anyAttributeArray;
  2853. #if NET_2_0
  2854. ServiceDescription.SetExtensibleAttributes (ob);
  2855. #endif
  2856. Reader.MoveToElement();
  2857. if (Reader.IsEmptyElement) {
  2858. Reader.Skip ();
  2859. return ob;
  2860. }
  2861. Reader.ReadStartElement();
  2862. Reader.MoveToContent();
  2863. bool b92=false;
  2864. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  2865. {
  2866. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  2867. {
  2868. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b92) {
  2869. b92 = true;
  2870. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  2871. }
  2872. else {
  2873. UnknownNode (ob);
  2874. }
  2875. }
  2876. else
  2877. UnknownNode(ob);
  2878. Reader.MoveToContent();
  2879. }
  2880. ReadEndElement();
  2881. return ob;
  2882. }
  2883. public System.Xml.Schema.XmlSchemaMinLengthFacet ReadObject_XmlSchemaMinLengthFacet (bool isNullable, bool checkType)
  2884. {
  2885. System.Xml.Schema.XmlSchemaMinLengthFacet ob = null;
  2886. if (isNullable && ReadNull()) return null;
  2887. if (checkType)
  2888. {
  2889. System.Xml.XmlQualifiedName t = GetXsiType();
  2890. if (t == null)
  2891. { }
  2892. else if (t.Name != "XmlSchemaMinLengthFacet" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  2893. throw CreateUnknownTypeException(t);
  2894. }
  2895. ob = new System.Xml.Schema.XmlSchemaMinLengthFacet ();
  2896. Reader.MoveToElement();
  2897. ob.@IsFixed = false;
  2898. int anyAttributeIndex = 0;
  2899. System.Xml.XmlAttribute[] anyAttributeArray = null;
  2900. while (Reader.MoveToNextAttribute())
  2901. {
  2902. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  2903. ob.@Id = Reader.Value;
  2904. }
  2905. else if (Reader.LocalName == "value" && Reader.NamespaceURI == "") {
  2906. ob.@Value = Reader.Value;
  2907. }
  2908. else if (Reader.LocalName == "fixed" && Reader.NamespaceURI == "") {
  2909. ob.@IsFixed = XmlConvert.ToBoolean (Reader.Value);
  2910. }
  2911. else if (IsXmlnsAttribute (Reader.Name)) {
  2912. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  2913. if (Reader.Prefix == "xmlns")
  2914. [email protected] (Reader.LocalName, Reader.Value);
  2915. else
  2916. [email protected] ("", Reader.Value);
  2917. }
  2918. else {
  2919. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  2920. ParseWsdlArrayType (attr);
  2921. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  2922. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  2923. anyAttributeIndex++;
  2924. }
  2925. }
  2926. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  2927. ob.@UnhandledAttributes = anyAttributeArray;
  2928. #if NET_2_0
  2929. ServiceDescription.SetExtensibleAttributes (ob);
  2930. #endif
  2931. Reader.MoveToElement();
  2932. if (Reader.IsEmptyElement) {
  2933. Reader.Skip ();
  2934. return ob;
  2935. }
  2936. Reader.ReadStartElement();
  2937. Reader.MoveToContent();
  2938. bool b93=false;
  2939. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  2940. {
  2941. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  2942. {
  2943. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b93) {
  2944. b93 = true;
  2945. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  2946. }
  2947. else {
  2948. UnknownNode (ob);
  2949. }
  2950. }
  2951. else
  2952. UnknownNode(ob);
  2953. Reader.MoveToContent();
  2954. }
  2955. ReadEndElement();
  2956. return ob;
  2957. }
  2958. public System.Xml.Schema.XmlSchemaLengthFacet ReadObject_XmlSchemaLengthFacet (bool isNullable, bool checkType)
  2959. {
  2960. System.Xml.Schema.XmlSchemaLengthFacet ob = null;
  2961. if (isNullable && ReadNull()) return null;
  2962. if (checkType)
  2963. {
  2964. System.Xml.XmlQualifiedName t = GetXsiType();
  2965. if (t == null)
  2966. { }
  2967. else if (t.Name != "XmlSchemaLengthFacet" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  2968. throw CreateUnknownTypeException(t);
  2969. }
  2970. ob = new System.Xml.Schema.XmlSchemaLengthFacet ();
  2971. Reader.MoveToElement();
  2972. ob.@IsFixed = false;
  2973. int anyAttributeIndex = 0;
  2974. System.Xml.XmlAttribute[] anyAttributeArray = null;
  2975. while (Reader.MoveToNextAttribute())
  2976. {
  2977. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  2978. ob.@Id = Reader.Value;
  2979. }
  2980. else if (Reader.LocalName == "value" && Reader.NamespaceURI == "") {
  2981. ob.@Value = Reader.Value;
  2982. }
  2983. else if (Reader.LocalName == "fixed" && Reader.NamespaceURI == "") {
  2984. ob.@IsFixed = XmlConvert.ToBoolean (Reader.Value);
  2985. }
  2986. else if (IsXmlnsAttribute (Reader.Name)) {
  2987. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  2988. if (Reader.Prefix == "xmlns")
  2989. [email protected] (Reader.LocalName, Reader.Value);
  2990. else
  2991. [email protected] ("", Reader.Value);
  2992. }
  2993. else {
  2994. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  2995. ParseWsdlArrayType (attr);
  2996. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  2997. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  2998. anyAttributeIndex++;
  2999. }
  3000. }
  3001. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  3002. ob.@UnhandledAttributes = anyAttributeArray;
  3003. #if NET_2_0
  3004. ServiceDescription.SetExtensibleAttributes (ob);
  3005. #endif
  3006. Reader.MoveToElement();
  3007. if (Reader.IsEmptyElement) {
  3008. Reader.Skip ();
  3009. return ob;
  3010. }
  3011. Reader.ReadStartElement();
  3012. Reader.MoveToContent();
  3013. bool b94=false;
  3014. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  3015. {
  3016. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  3017. {
  3018. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b94) {
  3019. b94 = true;
  3020. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  3021. }
  3022. else {
  3023. UnknownNode (ob);
  3024. }
  3025. }
  3026. else
  3027. UnknownNode(ob);
  3028. Reader.MoveToContent();
  3029. }
  3030. ReadEndElement();
  3031. return ob;
  3032. }
  3033. public System.Xml.Schema.XmlSchemaFractionDigitsFacet ReadObject_XmlSchemaFractionDigitsFacet (bool isNullable, bool checkType)
  3034. {
  3035. System.Xml.Schema.XmlSchemaFractionDigitsFacet ob = null;
  3036. if (isNullable && ReadNull()) return null;
  3037. if (checkType)
  3038. {
  3039. System.Xml.XmlQualifiedName t = GetXsiType();
  3040. if (t == null)
  3041. { }
  3042. else if (t.Name != "XmlSchemaFractionDigitsFacet" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  3043. throw CreateUnknownTypeException(t);
  3044. }
  3045. ob = new System.Xml.Schema.XmlSchemaFractionDigitsFacet ();
  3046. Reader.MoveToElement();
  3047. ob.@IsFixed = false;
  3048. int anyAttributeIndex = 0;
  3049. System.Xml.XmlAttribute[] anyAttributeArray = null;
  3050. while (Reader.MoveToNextAttribute())
  3051. {
  3052. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  3053. ob.@Id = Reader.Value;
  3054. }
  3055. else if (Reader.LocalName == "value" && Reader.NamespaceURI == "") {
  3056. ob.@Value = Reader.Value;
  3057. }
  3058. else if (Reader.LocalName == "fixed" && Reader.NamespaceURI == "") {
  3059. ob.@IsFixed = XmlConvert.ToBoolean (Reader.Value);
  3060. }
  3061. else if (IsXmlnsAttribute (Reader.Name)) {
  3062. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  3063. if (Reader.Prefix == "xmlns")
  3064. [email protected] (Reader.LocalName, Reader.Value);
  3065. else
  3066. [email protected] ("", Reader.Value);
  3067. }
  3068. else {
  3069. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  3070. ParseWsdlArrayType (attr);
  3071. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  3072. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  3073. anyAttributeIndex++;
  3074. }
  3075. }
  3076. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  3077. ob.@UnhandledAttributes = anyAttributeArray;
  3078. #if NET_2_0
  3079. ServiceDescription.SetExtensibleAttributes (ob);
  3080. #endif
  3081. Reader.MoveToElement();
  3082. if (Reader.IsEmptyElement) {
  3083. Reader.Skip ();
  3084. return ob;
  3085. }
  3086. Reader.ReadStartElement();
  3087. Reader.MoveToContent();
  3088. bool b95=false;
  3089. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  3090. {
  3091. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  3092. {
  3093. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b95) {
  3094. b95 = true;
  3095. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  3096. }
  3097. else {
  3098. UnknownNode (ob);
  3099. }
  3100. }
  3101. else
  3102. UnknownNode(ob);
  3103. Reader.MoveToContent();
  3104. }
  3105. ReadEndElement();
  3106. return ob;
  3107. }
  3108. public System.Xml.Schema.XmlSchemaTotalDigitsFacet ReadObject_XmlSchemaTotalDigitsFacet (bool isNullable, bool checkType)
  3109. {
  3110. System.Xml.Schema.XmlSchemaTotalDigitsFacet ob = null;
  3111. if (isNullable && ReadNull()) return null;
  3112. if (checkType)
  3113. {
  3114. System.Xml.XmlQualifiedName t = GetXsiType();
  3115. if (t == null)
  3116. { }
  3117. else if (t.Name != "XmlSchemaTotalDigitsFacet" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  3118. throw CreateUnknownTypeException(t);
  3119. }
  3120. ob = new System.Xml.Schema.XmlSchemaTotalDigitsFacet ();
  3121. Reader.MoveToElement();
  3122. ob.@IsFixed = false;
  3123. int anyAttributeIndex = 0;
  3124. System.Xml.XmlAttribute[] anyAttributeArray = null;
  3125. while (Reader.MoveToNextAttribute())
  3126. {
  3127. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  3128. ob.@Id = Reader.Value;
  3129. }
  3130. else if (Reader.LocalName == "value" && Reader.NamespaceURI == "") {
  3131. ob.@Value = Reader.Value;
  3132. }
  3133. else if (Reader.LocalName == "fixed" && Reader.NamespaceURI == "") {
  3134. ob.@IsFixed = XmlConvert.ToBoolean (Reader.Value);
  3135. }
  3136. else if (IsXmlnsAttribute (Reader.Name)) {
  3137. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  3138. if (Reader.Prefix == "xmlns")
  3139. [email protected] (Reader.LocalName, Reader.Value);
  3140. else
  3141. [email protected] ("", Reader.Value);
  3142. }
  3143. else {
  3144. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  3145. ParseWsdlArrayType (attr);
  3146. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  3147. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  3148. anyAttributeIndex++;
  3149. }
  3150. }
  3151. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  3152. ob.@UnhandledAttributes = anyAttributeArray;
  3153. #if NET_2_0
  3154. ServiceDescription.SetExtensibleAttributes (ob);
  3155. #endif
  3156. Reader.MoveToElement();
  3157. if (Reader.IsEmptyElement) {
  3158. Reader.Skip ();
  3159. return ob;
  3160. }
  3161. Reader.ReadStartElement();
  3162. Reader.MoveToContent();
  3163. bool b96=false;
  3164. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  3165. {
  3166. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  3167. {
  3168. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b96) {
  3169. b96 = true;
  3170. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  3171. }
  3172. else {
  3173. UnknownNode (ob);
  3174. }
  3175. }
  3176. else
  3177. UnknownNode(ob);
  3178. Reader.MoveToContent();
  3179. }
  3180. ReadEndElement();
  3181. return ob;
  3182. }
  3183. public System.Xml.Schema.XmlSchemaMaxInclusiveFacet ReadObject_XmlSchemaMaxInclusiveFacet (bool isNullable, bool checkType)
  3184. {
  3185. System.Xml.Schema.XmlSchemaMaxInclusiveFacet ob = null;
  3186. if (isNullable && ReadNull()) return null;
  3187. if (checkType)
  3188. {
  3189. System.Xml.XmlQualifiedName t = GetXsiType();
  3190. if (t == null)
  3191. { }
  3192. else if (t.Name != "XmlSchemaMaxInclusiveFacet" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  3193. throw CreateUnknownTypeException(t);
  3194. }
  3195. ob = new System.Xml.Schema.XmlSchemaMaxInclusiveFacet ();
  3196. Reader.MoveToElement();
  3197. ob.@IsFixed = false;
  3198. int anyAttributeIndex = 0;
  3199. System.Xml.XmlAttribute[] anyAttributeArray = null;
  3200. while (Reader.MoveToNextAttribute())
  3201. {
  3202. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  3203. ob.@Id = Reader.Value;
  3204. }
  3205. else if (Reader.LocalName == "value" && Reader.NamespaceURI == "") {
  3206. ob.@Value = Reader.Value;
  3207. }
  3208. else if (Reader.LocalName == "fixed" && Reader.NamespaceURI == "") {
  3209. ob.@IsFixed = XmlConvert.ToBoolean (Reader.Value);
  3210. }
  3211. else if (IsXmlnsAttribute (Reader.Name)) {
  3212. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  3213. if (Reader.Prefix == "xmlns")
  3214. [email protected] (Reader.LocalName, Reader.Value);
  3215. else
  3216. [email protected] ("", Reader.Value);
  3217. }
  3218. else {
  3219. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  3220. ParseWsdlArrayType (attr);
  3221. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  3222. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  3223. anyAttributeIndex++;
  3224. }
  3225. }
  3226. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  3227. ob.@UnhandledAttributes = anyAttributeArray;
  3228. #if NET_2_0
  3229. ServiceDescription.SetExtensibleAttributes (ob);
  3230. #endif
  3231. Reader.MoveToElement();
  3232. if (Reader.IsEmptyElement) {
  3233. Reader.Skip ();
  3234. return ob;
  3235. }
  3236. Reader.ReadStartElement();
  3237. Reader.MoveToContent();
  3238. bool b97=false;
  3239. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  3240. {
  3241. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  3242. {
  3243. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b97) {
  3244. b97 = true;
  3245. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  3246. }
  3247. else {
  3248. UnknownNode (ob);
  3249. }
  3250. }
  3251. else
  3252. UnknownNode(ob);
  3253. Reader.MoveToContent();
  3254. }
  3255. ReadEndElement();
  3256. return ob;
  3257. }
  3258. public System.Xml.Schema.XmlSchemaMaxExclusiveFacet ReadObject_XmlSchemaMaxExclusiveFacet (bool isNullable, bool checkType)
  3259. {
  3260. System.Xml.Schema.XmlSchemaMaxExclusiveFacet ob = null;
  3261. if (isNullable && ReadNull()) return null;
  3262. if (checkType)
  3263. {
  3264. System.Xml.XmlQualifiedName t = GetXsiType();
  3265. if (t == null)
  3266. { }
  3267. else if (t.Name != "XmlSchemaMaxExclusiveFacet" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  3268. throw CreateUnknownTypeException(t);
  3269. }
  3270. ob = new System.Xml.Schema.XmlSchemaMaxExclusiveFacet ();
  3271. Reader.MoveToElement();
  3272. ob.@IsFixed = false;
  3273. int anyAttributeIndex = 0;
  3274. System.Xml.XmlAttribute[] anyAttributeArray = null;
  3275. while (Reader.MoveToNextAttribute())
  3276. {
  3277. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  3278. ob.@Id = Reader.Value;
  3279. }
  3280. else if (Reader.LocalName == "value" && Reader.NamespaceURI == "") {
  3281. ob.@Value = Reader.Value;
  3282. }
  3283. else if (Reader.LocalName == "fixed" && Reader.NamespaceURI == "") {
  3284. ob.@IsFixed = XmlConvert.ToBoolean (Reader.Value);
  3285. }
  3286. else if (IsXmlnsAttribute (Reader.Name)) {
  3287. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  3288. if (Reader.Prefix == "xmlns")
  3289. [email protected] (Reader.LocalName, Reader.Value);
  3290. else
  3291. [email protected] ("", Reader.Value);
  3292. }
  3293. else {
  3294. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  3295. ParseWsdlArrayType (attr);
  3296. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  3297. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  3298. anyAttributeIndex++;
  3299. }
  3300. }
  3301. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  3302. ob.@UnhandledAttributes = anyAttributeArray;
  3303. #if NET_2_0
  3304. ServiceDescription.SetExtensibleAttributes (ob);
  3305. #endif
  3306. Reader.MoveToElement();
  3307. if (Reader.IsEmptyElement) {
  3308. Reader.Skip ();
  3309. return ob;
  3310. }
  3311. Reader.ReadStartElement();
  3312. Reader.MoveToContent();
  3313. bool b98=false;
  3314. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  3315. {
  3316. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  3317. {
  3318. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b98) {
  3319. b98 = true;
  3320. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  3321. }
  3322. else {
  3323. UnknownNode (ob);
  3324. }
  3325. }
  3326. else
  3327. UnknownNode(ob);
  3328. Reader.MoveToContent();
  3329. }
  3330. ReadEndElement();
  3331. return ob;
  3332. }
  3333. public System.Xml.Schema.XmlSchemaMinInclusiveFacet ReadObject_XmlSchemaMinInclusiveFacet (bool isNullable, bool checkType)
  3334. {
  3335. System.Xml.Schema.XmlSchemaMinInclusiveFacet ob = null;
  3336. if (isNullable && ReadNull()) return null;
  3337. if (checkType)
  3338. {
  3339. System.Xml.XmlQualifiedName t = GetXsiType();
  3340. if (t == null)
  3341. { }
  3342. else if (t.Name != "XmlSchemaMinInclusiveFacet" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  3343. throw CreateUnknownTypeException(t);
  3344. }
  3345. ob = new System.Xml.Schema.XmlSchemaMinInclusiveFacet ();
  3346. Reader.MoveToElement();
  3347. ob.@IsFixed = false;
  3348. int anyAttributeIndex = 0;
  3349. System.Xml.XmlAttribute[] anyAttributeArray = null;
  3350. while (Reader.MoveToNextAttribute())
  3351. {
  3352. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  3353. ob.@Id = Reader.Value;
  3354. }
  3355. else if (Reader.LocalName == "value" && Reader.NamespaceURI == "") {
  3356. ob.@Value = Reader.Value;
  3357. }
  3358. else if (Reader.LocalName == "fixed" && Reader.NamespaceURI == "") {
  3359. ob.@IsFixed = XmlConvert.ToBoolean (Reader.Value);
  3360. }
  3361. else if (IsXmlnsAttribute (Reader.Name)) {
  3362. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  3363. if (Reader.Prefix == "xmlns")
  3364. [email protected] (Reader.LocalName, Reader.Value);
  3365. else
  3366. [email protected] ("", Reader.Value);
  3367. }
  3368. else {
  3369. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  3370. ParseWsdlArrayType (attr);
  3371. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  3372. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  3373. anyAttributeIndex++;
  3374. }
  3375. }
  3376. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  3377. ob.@UnhandledAttributes = anyAttributeArray;
  3378. #if NET_2_0
  3379. ServiceDescription.SetExtensibleAttributes (ob);
  3380. #endif
  3381. Reader.MoveToElement();
  3382. if (Reader.IsEmptyElement) {
  3383. Reader.Skip ();
  3384. return ob;
  3385. }
  3386. Reader.ReadStartElement();
  3387. Reader.MoveToContent();
  3388. bool b99=false;
  3389. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  3390. {
  3391. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  3392. {
  3393. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b99) {
  3394. b99 = true;
  3395. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  3396. }
  3397. else {
  3398. UnknownNode (ob);
  3399. }
  3400. }
  3401. else
  3402. UnknownNode(ob);
  3403. Reader.MoveToContent();
  3404. }
  3405. ReadEndElement();
  3406. return ob;
  3407. }
  3408. public System.Xml.Schema.XmlSchemaMinExclusiveFacet ReadObject_XmlSchemaMinExclusiveFacet (bool isNullable, bool checkType)
  3409. {
  3410. System.Xml.Schema.XmlSchemaMinExclusiveFacet ob = null;
  3411. if (isNullable && ReadNull()) return null;
  3412. if (checkType)
  3413. {
  3414. System.Xml.XmlQualifiedName t = GetXsiType();
  3415. if (t == null)
  3416. { }
  3417. else if (t.Name != "XmlSchemaMinExclusiveFacet" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  3418. throw CreateUnknownTypeException(t);
  3419. }
  3420. ob = new System.Xml.Schema.XmlSchemaMinExclusiveFacet ();
  3421. Reader.MoveToElement();
  3422. ob.@IsFixed = false;
  3423. int anyAttributeIndex = 0;
  3424. System.Xml.XmlAttribute[] anyAttributeArray = null;
  3425. while (Reader.MoveToNextAttribute())
  3426. {
  3427. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  3428. ob.@Id = Reader.Value;
  3429. }
  3430. else if (Reader.LocalName == "value" && Reader.NamespaceURI == "") {
  3431. ob.@Value = Reader.Value;
  3432. }
  3433. else if (Reader.LocalName == "fixed" && Reader.NamespaceURI == "") {
  3434. ob.@IsFixed = XmlConvert.ToBoolean (Reader.Value);
  3435. }
  3436. else if (IsXmlnsAttribute (Reader.Name)) {
  3437. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  3438. if (Reader.Prefix == "xmlns")
  3439. [email protected] (Reader.LocalName, Reader.Value);
  3440. else
  3441. [email protected] ("", Reader.Value);
  3442. }
  3443. else {
  3444. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  3445. ParseWsdlArrayType (attr);
  3446. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  3447. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  3448. anyAttributeIndex++;
  3449. }
  3450. }
  3451. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  3452. ob.@UnhandledAttributes = anyAttributeArray;
  3453. #if NET_2_0
  3454. ServiceDescription.SetExtensibleAttributes (ob);
  3455. #endif
  3456. Reader.MoveToElement();
  3457. if (Reader.IsEmptyElement) {
  3458. Reader.Skip ();
  3459. return ob;
  3460. }
  3461. Reader.ReadStartElement();
  3462. Reader.MoveToContent();
  3463. bool b100=false;
  3464. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  3465. {
  3466. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  3467. {
  3468. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b100) {
  3469. b100 = true;
  3470. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  3471. }
  3472. else {
  3473. UnknownNode (ob);
  3474. }
  3475. }
  3476. else
  3477. UnknownNode(ob);
  3478. Reader.MoveToContent();
  3479. }
  3480. ReadEndElement();
  3481. return ob;
  3482. }
  3483. public System.Xml.Schema.XmlSchemaSimpleTypeRestriction ReadObject_XmlSchemaSimpleTypeRestriction (bool isNullable, bool checkType)
  3484. {
  3485. System.Xml.Schema.XmlSchemaSimpleTypeRestriction ob = null;
  3486. if (isNullable && ReadNull()) return null;
  3487. if (checkType)
  3488. {
  3489. System.Xml.XmlQualifiedName t = GetXsiType();
  3490. if (t == null)
  3491. { }
  3492. else if (t.Name != "XmlSchemaSimpleTypeRestriction" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  3493. throw CreateUnknownTypeException(t);
  3494. }
  3495. ob = new System.Xml.Schema.XmlSchemaSimpleTypeRestriction ();
  3496. Reader.MoveToElement();
  3497. int anyAttributeIndex = 0;
  3498. System.Xml.XmlAttribute[] anyAttributeArray = null;
  3499. while (Reader.MoveToNextAttribute())
  3500. {
  3501. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  3502. ob.@Id = Reader.Value;
  3503. }
  3504. else if (Reader.LocalName == "base" && Reader.NamespaceURI == "") {
  3505. ob.@BaseTypeName = ToXmlQualifiedName (Reader.Value);
  3506. }
  3507. else if (IsXmlnsAttribute (Reader.Name)) {
  3508. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  3509. if (Reader.Prefix == "xmlns")
  3510. [email protected] (Reader.LocalName, Reader.Value);
  3511. else
  3512. [email protected] ("", Reader.Value);
  3513. }
  3514. else {
  3515. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  3516. ParseWsdlArrayType (attr);
  3517. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  3518. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  3519. anyAttributeIndex++;
  3520. }
  3521. }
  3522. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  3523. ob.@UnhandledAttributes = anyAttributeArray;
  3524. #if NET_2_0
  3525. ServiceDescription.SetExtensibleAttributes (ob);
  3526. #endif
  3527. Reader.MoveToElement();
  3528. if (Reader.IsEmptyElement) {
  3529. Reader.Skip ();
  3530. return ob;
  3531. }
  3532. Reader.ReadStartElement();
  3533. Reader.MoveToContent();
  3534. bool b101=false, b102=false, b103=false;
  3535. System.Xml.Schema.XmlSchemaObjectCollection o105;
  3536. o105 = ob.@Facets;
  3537. int n104=0;
  3538. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  3539. {
  3540. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  3541. {
  3542. if (Reader.LocalName == "enumeration" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b103) {
  3543. if (((object)o105) == null)
  3544. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  3545. o105.Add (ReadObject_XmlSchemaEnumerationFacet (false, true));
  3546. n104++;
  3547. }
  3548. else if (Reader.LocalName == "pattern" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b103) {
  3549. if (((object)o105) == null)
  3550. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  3551. o105.Add (ReadObject_XmlSchemaPatternFacet (false, true));
  3552. n104++;
  3553. }
  3554. else if (Reader.LocalName == "maxInclusive" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b103) {
  3555. if (((object)o105) == null)
  3556. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  3557. o105.Add (ReadObject_XmlSchemaMaxInclusiveFacet (false, true));
  3558. n104++;
  3559. }
  3560. else if (Reader.LocalName == "minLength" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b103) {
  3561. if (((object)o105) == null)
  3562. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  3563. o105.Add (ReadObject_XmlSchemaMinLengthFacet (false, true));
  3564. n104++;
  3565. }
  3566. else if (Reader.LocalName == "minInclusive" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b103) {
  3567. if (((object)o105) == null)
  3568. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  3569. o105.Add (ReadObject_XmlSchemaMinInclusiveFacet (false, true));
  3570. n104++;
  3571. }
  3572. else if (Reader.LocalName == "length" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b103) {
  3573. if (((object)o105) == null)
  3574. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  3575. o105.Add (ReadObject_XmlSchemaLengthFacet (false, true));
  3576. n104++;
  3577. }
  3578. else if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b101) {
  3579. b101 = true;
  3580. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  3581. }
  3582. else if (Reader.LocalName == "totalDigits" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b103) {
  3583. if (((object)o105) == null)
  3584. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  3585. o105.Add (ReadObject_XmlSchemaTotalDigitsFacet (false, true));
  3586. n104++;
  3587. }
  3588. else if (Reader.LocalName == "maxLength" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b103) {
  3589. if (((object)o105) == null)
  3590. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  3591. o105.Add (ReadObject_XmlSchemaMaxLengthFacet (false, true));
  3592. n104++;
  3593. }
  3594. else if (Reader.LocalName == "minExclusive" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b103) {
  3595. if (((object)o105) == null)
  3596. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  3597. o105.Add (ReadObject_XmlSchemaMinExclusiveFacet (false, true));
  3598. n104++;
  3599. }
  3600. else if (Reader.LocalName == "fractionDigits" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b103) {
  3601. if (((object)o105) == null)
  3602. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  3603. o105.Add (ReadObject_XmlSchemaFractionDigitsFacet (false, true));
  3604. n104++;
  3605. }
  3606. else if (Reader.LocalName == "simpleType" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b102) {
  3607. b102 = true;
  3608. ob.@BaseType = ReadObject_XmlSchemaSimpleType (false, true);
  3609. }
  3610. else if (Reader.LocalName == "whiteSpace" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b103) {
  3611. if (((object)o105) == null)
  3612. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  3613. o105.Add (ReadObject_XmlSchemaWhiteSpaceFacet (false, true));
  3614. n104++;
  3615. }
  3616. else if (Reader.LocalName == "maxExclusive" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b103) {
  3617. if (((object)o105) == null)
  3618. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  3619. o105.Add (ReadObject_XmlSchemaMaxExclusiveFacet (false, true));
  3620. n104++;
  3621. }
  3622. else {
  3623. UnknownNode (ob);
  3624. }
  3625. }
  3626. else
  3627. UnknownNode(ob);
  3628. Reader.MoveToContent();
  3629. }
  3630. ReadEndElement();
  3631. return ob;
  3632. }
  3633. public System.Xml.Schema.XmlSchemaSimpleType ReadObject_XmlSchemaSimpleType (bool isNullable, bool checkType)
  3634. {
  3635. System.Xml.Schema.XmlSchemaSimpleType ob = null;
  3636. if (isNullable && ReadNull()) return null;
  3637. if (checkType)
  3638. {
  3639. System.Xml.XmlQualifiedName t = GetXsiType();
  3640. if (t == null)
  3641. { }
  3642. else if (t.Name != "XmlSchemaSimpleType" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  3643. throw CreateUnknownTypeException(t);
  3644. }
  3645. ob = new System.Xml.Schema.XmlSchemaSimpleType ();
  3646. Reader.MoveToElement();
  3647. ob.@Final = ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None);
  3648. int anyAttributeIndex = 0;
  3649. System.Xml.XmlAttribute[] anyAttributeArray = null;
  3650. while (Reader.MoveToNextAttribute())
  3651. {
  3652. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  3653. ob.@Id = Reader.Value;
  3654. }
  3655. else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  3656. ob.@Name = Reader.Value;
  3657. }
  3658. else if (Reader.LocalName == "final" && Reader.NamespaceURI == "") {
  3659. ob.@Final = GetEnumValue_XmlSchemaDerivationMethod (Reader.Value);
  3660. }
  3661. else if (IsXmlnsAttribute (Reader.Name)) {
  3662. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  3663. if (Reader.Prefix == "xmlns")
  3664. [email protected] (Reader.LocalName, Reader.Value);
  3665. else
  3666. [email protected] ("", Reader.Value);
  3667. }
  3668. else {
  3669. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  3670. ParseWsdlArrayType (attr);
  3671. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  3672. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  3673. anyAttributeIndex++;
  3674. }
  3675. }
  3676. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  3677. ob.@UnhandledAttributes = anyAttributeArray;
  3678. #if NET_2_0
  3679. ServiceDescription.SetExtensibleAttributes (ob);
  3680. #endif
  3681. Reader.MoveToElement();
  3682. if (Reader.IsEmptyElement) {
  3683. Reader.Skip ();
  3684. return ob;
  3685. }
  3686. Reader.ReadStartElement();
  3687. Reader.MoveToContent();
  3688. bool b106=false, b107=false;
  3689. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  3690. {
  3691. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  3692. {
  3693. if (Reader.LocalName == "restriction" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b107) {
  3694. b107 = true;
  3695. ob.@Content = ReadObject_XmlSchemaSimpleTypeRestriction (false, true);
  3696. }
  3697. else if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b106) {
  3698. b106 = true;
  3699. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  3700. }
  3701. else if (Reader.LocalName == "union" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b107) {
  3702. b107 = true;
  3703. ob.@Content = ReadObject_XmlSchemaSimpleTypeUnion (false, true);
  3704. }
  3705. else if (Reader.LocalName == "list" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b107) {
  3706. b107 = true;
  3707. ob.@Content = ReadObject_XmlSchemaSimpleTypeList (false, true);
  3708. }
  3709. else {
  3710. UnknownNode (ob);
  3711. }
  3712. }
  3713. else
  3714. UnknownNode(ob);
  3715. Reader.MoveToContent();
  3716. }
  3717. ReadEndElement();
  3718. return ob;
  3719. }
  3720. public System.Xml.Schema.XmlSchemaUse ReadObject_XmlSchemaUse (bool isNullable, bool checkType)
  3721. {
  3722. Reader.ReadStartElement ();
  3723. System.Xml.Schema.XmlSchemaUse res = GetEnumValue_XmlSchemaUse (Reader.ReadString());
  3724. if (Reader.NodeType != XmlNodeType.None)
  3725. Reader.ReadEndElement ();
  3726. return res;
  3727. }
  3728. System.Xml.Schema.XmlSchemaUse GetEnumValue_XmlSchemaUse (string xmlName)
  3729. {
  3730. switch (xmlName)
  3731. {
  3732. case "optional": return System.Xml.Schema.XmlSchemaUse.Optional;
  3733. case "prohibited": return System.Xml.Schema.XmlSchemaUse.Prohibited;
  3734. case "required": return System.Xml.Schema.XmlSchemaUse.Required;
  3735. default:
  3736. throw CreateUnknownConstantException (xmlName, typeof(System.Xml.Schema.XmlSchemaUse));
  3737. }
  3738. }
  3739. public System.Xml.Schema.XmlSchemaAttribute ReadObject_XmlSchemaAttribute (bool isNullable, bool checkType)
  3740. {
  3741. System.Xml.Schema.XmlSchemaAttribute ob = null;
  3742. if (isNullable && ReadNull()) return null;
  3743. if (checkType)
  3744. {
  3745. System.Xml.XmlQualifiedName t = GetXsiType();
  3746. if (t == null)
  3747. { }
  3748. else if (t.Name != "XmlSchemaAttribute" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  3749. throw CreateUnknownTypeException(t);
  3750. }
  3751. ob = new System.Xml.Schema.XmlSchemaAttribute ();
  3752. Reader.MoveToElement();
  3753. ob.@Form = ((System.Xml.Schema.XmlSchemaForm) System.Xml.Schema.XmlSchemaForm.None);
  3754. ob.@Use = ((System.Xml.Schema.XmlSchemaUse) System.Xml.Schema.XmlSchemaUse.None);
  3755. int anyAttributeIndex = 0;
  3756. System.Xml.XmlAttribute[] anyAttributeArray = null;
  3757. while (Reader.MoveToNextAttribute())
  3758. {
  3759. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  3760. ob.@Id = Reader.Value;
  3761. }
  3762. else if (Reader.LocalName == "default" && Reader.NamespaceURI == "") {
  3763. ob.@DefaultValue = Reader.Value;
  3764. }
  3765. else if (Reader.LocalName == "fixed" && Reader.NamespaceURI == "") {
  3766. ob.@FixedValue = Reader.Value;
  3767. }
  3768. else if (Reader.LocalName == "form" && Reader.NamespaceURI == "") {
  3769. ob.@Form = GetEnumValue_XmlSchemaForm (Reader.Value);
  3770. }
  3771. else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  3772. ob.@Name = Reader.Value;
  3773. }
  3774. else if (Reader.LocalName == "ref" && Reader.NamespaceURI == "") {
  3775. ob.@RefName = ToXmlQualifiedName (Reader.Value);
  3776. }
  3777. else if (Reader.LocalName == "type" && Reader.NamespaceURI == "") {
  3778. ob.@SchemaTypeName = ToXmlQualifiedName (Reader.Value);
  3779. }
  3780. else if (Reader.LocalName == "use" && Reader.NamespaceURI == "") {
  3781. ob.@Use = GetEnumValue_XmlSchemaUse (Reader.Value);
  3782. }
  3783. else if (IsXmlnsAttribute (Reader.Name)) {
  3784. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  3785. if (Reader.Prefix == "xmlns")
  3786. [email protected] (Reader.LocalName, Reader.Value);
  3787. else
  3788. [email protected] ("", Reader.Value);
  3789. }
  3790. else {
  3791. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  3792. ParseWsdlArrayType (attr);
  3793. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  3794. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  3795. anyAttributeIndex++;
  3796. }
  3797. }
  3798. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  3799. ob.@UnhandledAttributes = anyAttributeArray;
  3800. #if NET_2_0
  3801. ServiceDescription.SetExtensibleAttributes (ob);
  3802. #endif
  3803. Reader.MoveToElement();
  3804. if (Reader.IsEmptyElement) {
  3805. Reader.Skip ();
  3806. return ob;
  3807. }
  3808. Reader.ReadStartElement();
  3809. Reader.MoveToContent();
  3810. bool b108=false, b109=false;
  3811. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  3812. {
  3813. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  3814. {
  3815. if (Reader.LocalName == "simpleType" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b109) {
  3816. b109 = true;
  3817. ob.@SchemaType = ReadObject_XmlSchemaSimpleType (false, true);
  3818. }
  3819. else if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b108) {
  3820. b108 = true;
  3821. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  3822. }
  3823. else {
  3824. UnknownNode (ob);
  3825. }
  3826. }
  3827. else
  3828. UnknownNode(ob);
  3829. Reader.MoveToContent();
  3830. }
  3831. ReadEndElement();
  3832. return ob;
  3833. }
  3834. public System.Xml.Schema.XmlSchemaContentProcessing ReadObject_XmlSchemaContentProcessing (bool isNullable, bool checkType)
  3835. {
  3836. Reader.ReadStartElement ();
  3837. System.Xml.Schema.XmlSchemaContentProcessing res = GetEnumValue_XmlSchemaContentProcessing (Reader.ReadString());
  3838. if (Reader.NodeType != XmlNodeType.None)
  3839. Reader.ReadEndElement ();
  3840. return res;
  3841. }
  3842. System.Xml.Schema.XmlSchemaContentProcessing GetEnumValue_XmlSchemaContentProcessing (string xmlName)
  3843. {
  3844. switch (xmlName)
  3845. {
  3846. case "skip": return System.Xml.Schema.XmlSchemaContentProcessing.Skip;
  3847. case "lax": return System.Xml.Schema.XmlSchemaContentProcessing.Lax;
  3848. case "strict": return System.Xml.Schema.XmlSchemaContentProcessing.Strict;
  3849. default:
  3850. throw CreateUnknownConstantException (xmlName, typeof(System.Xml.Schema.XmlSchemaContentProcessing));
  3851. }
  3852. }
  3853. public System.Xml.Schema.XmlSchemaAnyAttribute ReadObject_XmlSchemaAnyAttribute (bool isNullable, bool checkType)
  3854. {
  3855. System.Xml.Schema.XmlSchemaAnyAttribute ob = null;
  3856. if (isNullable && ReadNull()) return null;
  3857. if (checkType)
  3858. {
  3859. System.Xml.XmlQualifiedName t = GetXsiType();
  3860. if (t == null)
  3861. { }
  3862. else if (t.Name != "XmlSchemaAnyAttribute" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  3863. throw CreateUnknownTypeException(t);
  3864. }
  3865. ob = new System.Xml.Schema.XmlSchemaAnyAttribute ();
  3866. Reader.MoveToElement();
  3867. ob.@ProcessContents = ((System.Xml.Schema.XmlSchemaContentProcessing) System.Xml.Schema.XmlSchemaContentProcessing.None);
  3868. int anyAttributeIndex = 0;
  3869. System.Xml.XmlAttribute[] anyAttributeArray = null;
  3870. while (Reader.MoveToNextAttribute())
  3871. {
  3872. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  3873. ob.@Id = Reader.Value;
  3874. }
  3875. else if (Reader.LocalName == "namespace" && Reader.NamespaceURI == "") {
  3876. ob.@Namespace = Reader.Value;
  3877. }
  3878. else if (Reader.LocalName == "processContents" && Reader.NamespaceURI == "") {
  3879. ob.@ProcessContents = GetEnumValue_XmlSchemaContentProcessing (Reader.Value);
  3880. }
  3881. else if (IsXmlnsAttribute (Reader.Name)) {
  3882. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  3883. if (Reader.Prefix == "xmlns")
  3884. [email protected] (Reader.LocalName, Reader.Value);
  3885. else
  3886. [email protected] ("", Reader.Value);
  3887. }
  3888. else {
  3889. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  3890. ParseWsdlArrayType (attr);
  3891. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  3892. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  3893. anyAttributeIndex++;
  3894. }
  3895. }
  3896. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  3897. ob.@UnhandledAttributes = anyAttributeArray;
  3898. #if NET_2_0
  3899. ServiceDescription.SetExtensibleAttributes (ob);
  3900. #endif
  3901. Reader.MoveToElement();
  3902. if (Reader.IsEmptyElement) {
  3903. Reader.Skip ();
  3904. return ob;
  3905. }
  3906. Reader.ReadStartElement();
  3907. Reader.MoveToContent();
  3908. bool b110=false;
  3909. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  3910. {
  3911. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  3912. {
  3913. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b110) {
  3914. b110 = true;
  3915. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  3916. }
  3917. else {
  3918. UnknownNode (ob);
  3919. }
  3920. }
  3921. else
  3922. UnknownNode(ob);
  3923. Reader.MoveToContent();
  3924. }
  3925. ReadEndElement();
  3926. return ob;
  3927. }
  3928. public System.Xml.Schema.XmlSchemaAttributeGroup ReadObject_XmlSchemaAttributeGroup (bool isNullable, bool checkType)
  3929. {
  3930. System.Xml.Schema.XmlSchemaAttributeGroup ob = null;
  3931. if (isNullable && ReadNull()) return null;
  3932. if (checkType)
  3933. {
  3934. System.Xml.XmlQualifiedName t = GetXsiType();
  3935. if (t == null)
  3936. { }
  3937. else if (t.Name != "XmlSchemaAttributeGroup" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  3938. throw CreateUnknownTypeException(t);
  3939. }
  3940. ob = new System.Xml.Schema.XmlSchemaAttributeGroup ();
  3941. Reader.MoveToElement();
  3942. int anyAttributeIndex = 0;
  3943. System.Xml.XmlAttribute[] anyAttributeArray = null;
  3944. while (Reader.MoveToNextAttribute())
  3945. {
  3946. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  3947. ob.@Id = Reader.Value;
  3948. }
  3949. else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  3950. ob.@Name = Reader.Value;
  3951. }
  3952. else if (IsXmlnsAttribute (Reader.Name)) {
  3953. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  3954. if (Reader.Prefix == "xmlns")
  3955. [email protected] (Reader.LocalName, Reader.Value);
  3956. else
  3957. [email protected] ("", Reader.Value);
  3958. }
  3959. else {
  3960. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  3961. ParseWsdlArrayType (attr);
  3962. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  3963. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  3964. anyAttributeIndex++;
  3965. }
  3966. }
  3967. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  3968. ob.@UnhandledAttributes = anyAttributeArray;
  3969. #if NET_2_0
  3970. ServiceDescription.SetExtensibleAttributes (ob);
  3971. #endif
  3972. Reader.MoveToElement();
  3973. if (Reader.IsEmptyElement) {
  3974. Reader.Skip ();
  3975. return ob;
  3976. }
  3977. Reader.ReadStartElement();
  3978. Reader.MoveToContent();
  3979. bool b111=false, b112=false, b113=false;
  3980. System.Xml.Schema.XmlSchemaObjectCollection o115;
  3981. o115 = ob.@Attributes;
  3982. int n114=0;
  3983. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  3984. {
  3985. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  3986. {
  3987. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b111) {
  3988. b111 = true;
  3989. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  3990. }
  3991. else if (Reader.LocalName == "anyAttribute" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b113) {
  3992. b113 = true;
  3993. ob.@AnyAttribute = ReadObject_XmlSchemaAnyAttribute (false, true);
  3994. }
  3995. else if (Reader.LocalName == "attribute" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b112) {
  3996. if (((object)o115) == null)
  3997. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  3998. o115.Add (ReadObject_XmlSchemaAttribute (false, true));
  3999. n114++;
  4000. }
  4001. else if (Reader.LocalName == "attributeGroup" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b112) {
  4002. if (((object)o115) == null)
  4003. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  4004. o115.Add (ReadObject_XmlSchemaAttributeGroupRef (false, true));
  4005. n114++;
  4006. }
  4007. else {
  4008. UnknownNode (ob);
  4009. }
  4010. }
  4011. else
  4012. UnknownNode(ob);
  4013. Reader.MoveToContent();
  4014. }
  4015. ReadEndElement();
  4016. return ob;
  4017. }
  4018. public System.Xml.Schema.XmlSchemaParticle ReadObject_XmlSchemaParticle (bool isNullable, bool checkType)
  4019. {
  4020. System.Xml.Schema.XmlSchemaParticle ob = null;
  4021. if (isNullable && ReadNull()) return null;
  4022. if (checkType)
  4023. {
  4024. System.Xml.XmlQualifiedName t = GetXsiType();
  4025. if (t == null)
  4026. { }
  4027. else if (t.Name == "XmlSchemaAny" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  4028. return ReadObject_XmlSchemaAny (isNullable, checkType);
  4029. else if (t.Name == "XmlSchemaGroupRef" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  4030. return ReadObject_XmlSchemaGroupRef (isNullable, checkType);
  4031. else if (t.Name == "XmlSchemaGroupBase" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  4032. return ReadObject_XmlSchemaGroupBase (isNullable, checkType);
  4033. else if (t.Name == "XmlSchemaAll" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  4034. return ReadObject_XmlSchemaAll (isNullable, checkType);
  4035. else if (t.Name == "XmlSchemaElement" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  4036. return ReadObject_XmlSchemaElement (isNullable, checkType);
  4037. else if (t.Name == "XmlSchemaChoice" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  4038. return ReadObject_XmlSchemaChoice (isNullable, checkType);
  4039. else if (t.Name == "XmlSchemaSequence" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  4040. return ReadObject_XmlSchemaSequence (isNullable, checkType);
  4041. else if (t.Name != "XmlSchemaParticle" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  4042. throw CreateUnknownTypeException(t);
  4043. }
  4044. return ob;
  4045. }
  4046. public System.Xml.Schema.XmlSchemaAny ReadObject_XmlSchemaAny (bool isNullable, bool checkType)
  4047. {
  4048. System.Xml.Schema.XmlSchemaAny ob = null;
  4049. if (isNullable && ReadNull()) return null;
  4050. if (checkType)
  4051. {
  4052. System.Xml.XmlQualifiedName t = GetXsiType();
  4053. if (t == null)
  4054. { }
  4055. else if (t.Name != "XmlSchemaAny" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  4056. throw CreateUnknownTypeException(t);
  4057. }
  4058. ob = new System.Xml.Schema.XmlSchemaAny ();
  4059. Reader.MoveToElement();
  4060. ob.@ProcessContents = ((System.Xml.Schema.XmlSchemaContentProcessing) System.Xml.Schema.XmlSchemaContentProcessing.None);
  4061. int anyAttributeIndex = 0;
  4062. System.Xml.XmlAttribute[] anyAttributeArray = null;
  4063. while (Reader.MoveToNextAttribute())
  4064. {
  4065. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  4066. ob.@Id = Reader.Value;
  4067. }
  4068. else if (Reader.LocalName == "minOccurs" && Reader.NamespaceURI == "") {
  4069. ob.@MinOccursString = Reader.Value;
  4070. }
  4071. else if (Reader.LocalName == "maxOccurs" && Reader.NamespaceURI == "") {
  4072. ob.@MaxOccursString = Reader.Value;
  4073. }
  4074. else if (Reader.LocalName == "namespace" && Reader.NamespaceURI == "") {
  4075. ob.@Namespace = Reader.Value;
  4076. }
  4077. else if (Reader.LocalName == "processContents" && Reader.NamespaceURI == "") {
  4078. ob.@ProcessContents = GetEnumValue_XmlSchemaContentProcessing (Reader.Value);
  4079. }
  4080. else if (IsXmlnsAttribute (Reader.Name)) {
  4081. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  4082. if (Reader.Prefix == "xmlns")
  4083. [email protected] (Reader.LocalName, Reader.Value);
  4084. else
  4085. [email protected] ("", Reader.Value);
  4086. }
  4087. else {
  4088. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  4089. ParseWsdlArrayType (attr);
  4090. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  4091. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  4092. anyAttributeIndex++;
  4093. }
  4094. }
  4095. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  4096. ob.@UnhandledAttributes = anyAttributeArray;
  4097. #if NET_2_0
  4098. ServiceDescription.SetExtensibleAttributes (ob);
  4099. #endif
  4100. Reader.MoveToElement();
  4101. if (Reader.IsEmptyElement) {
  4102. Reader.Skip ();
  4103. return ob;
  4104. }
  4105. Reader.ReadStartElement();
  4106. Reader.MoveToContent();
  4107. bool b116=false;
  4108. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  4109. {
  4110. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  4111. {
  4112. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b116) {
  4113. b116 = true;
  4114. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  4115. }
  4116. else {
  4117. UnknownNode (ob);
  4118. }
  4119. }
  4120. else
  4121. UnknownNode(ob);
  4122. Reader.MoveToContent();
  4123. }
  4124. ReadEndElement();
  4125. return ob;
  4126. }
  4127. public System.Xml.Schema.XmlSchemaGroupRef ReadObject_XmlSchemaGroupRef (bool isNullable, bool checkType)
  4128. {
  4129. System.Xml.Schema.XmlSchemaGroupRef ob = null;
  4130. if (isNullable && ReadNull()) return null;
  4131. if (checkType)
  4132. {
  4133. System.Xml.XmlQualifiedName t = GetXsiType();
  4134. if (t == null)
  4135. { }
  4136. else if (t.Name != "XmlSchemaGroupRef" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  4137. throw CreateUnknownTypeException(t);
  4138. }
  4139. ob = new System.Xml.Schema.XmlSchemaGroupRef ();
  4140. Reader.MoveToElement();
  4141. int anyAttributeIndex = 0;
  4142. System.Xml.XmlAttribute[] anyAttributeArray = null;
  4143. while (Reader.MoveToNextAttribute())
  4144. {
  4145. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  4146. ob.@Id = Reader.Value;
  4147. }
  4148. else if (Reader.LocalName == "minOccurs" && Reader.NamespaceURI == "") {
  4149. ob.@MinOccursString = Reader.Value;
  4150. }
  4151. else if (Reader.LocalName == "maxOccurs" && Reader.NamespaceURI == "") {
  4152. ob.@MaxOccursString = Reader.Value;
  4153. }
  4154. else if (Reader.LocalName == "ref" && Reader.NamespaceURI == "") {
  4155. ob.@RefName = ToXmlQualifiedName (Reader.Value);
  4156. }
  4157. else if (IsXmlnsAttribute (Reader.Name)) {
  4158. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  4159. if (Reader.Prefix == "xmlns")
  4160. [email protected] (Reader.LocalName, Reader.Value);
  4161. else
  4162. [email protected] ("", Reader.Value);
  4163. }
  4164. else {
  4165. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  4166. ParseWsdlArrayType (attr);
  4167. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  4168. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  4169. anyAttributeIndex++;
  4170. }
  4171. }
  4172. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  4173. ob.@UnhandledAttributes = anyAttributeArray;
  4174. #if NET_2_0
  4175. ServiceDescription.SetExtensibleAttributes (ob);
  4176. #endif
  4177. Reader.MoveToElement();
  4178. if (Reader.IsEmptyElement) {
  4179. Reader.Skip ();
  4180. return ob;
  4181. }
  4182. Reader.ReadStartElement();
  4183. Reader.MoveToContent();
  4184. bool b117=false;
  4185. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  4186. {
  4187. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  4188. {
  4189. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b117) {
  4190. b117 = true;
  4191. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  4192. }
  4193. else {
  4194. UnknownNode (ob);
  4195. }
  4196. }
  4197. else
  4198. UnknownNode(ob);
  4199. Reader.MoveToContent();
  4200. }
  4201. ReadEndElement();
  4202. return ob;
  4203. }
  4204. public System.Xml.Schema.XmlSchemaGroupBase ReadObject_XmlSchemaGroupBase (bool isNullable, bool checkType)
  4205. {
  4206. System.Xml.Schema.XmlSchemaGroupBase ob = null;
  4207. if (isNullable && ReadNull()) return null;
  4208. if (checkType)
  4209. {
  4210. System.Xml.XmlQualifiedName t = GetXsiType();
  4211. if (t == null)
  4212. { }
  4213. else if (t.Name == "XmlSchemaAll" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  4214. return ReadObject_XmlSchemaAll (isNullable, checkType);
  4215. else if (t.Name == "XmlSchemaChoice" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  4216. return ReadObject_XmlSchemaChoice (isNullable, checkType);
  4217. else if (t.Name == "XmlSchemaSequence" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  4218. return ReadObject_XmlSchemaSequence (isNullable, checkType);
  4219. else if (t.Name != "XmlSchemaGroupBase" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  4220. throw CreateUnknownTypeException(t);
  4221. }
  4222. return ob;
  4223. }
  4224. public System.Xml.Schema.XmlSchemaAll ReadObject_XmlSchemaAll (bool isNullable, bool checkType)
  4225. {
  4226. System.Xml.Schema.XmlSchemaAll ob = null;
  4227. if (isNullable && ReadNull()) return null;
  4228. if (checkType)
  4229. {
  4230. System.Xml.XmlQualifiedName t = GetXsiType();
  4231. if (t == null)
  4232. { }
  4233. else if (t.Name != "XmlSchemaAll" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  4234. throw CreateUnknownTypeException(t);
  4235. }
  4236. ob = new System.Xml.Schema.XmlSchemaAll ();
  4237. Reader.MoveToElement();
  4238. int anyAttributeIndex = 0;
  4239. System.Xml.XmlAttribute[] anyAttributeArray = null;
  4240. while (Reader.MoveToNextAttribute())
  4241. {
  4242. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  4243. ob.@Id = Reader.Value;
  4244. }
  4245. else if (Reader.LocalName == "minOccurs" && Reader.NamespaceURI == "") {
  4246. ob.@MinOccursString = Reader.Value;
  4247. }
  4248. else if (Reader.LocalName == "maxOccurs" && Reader.NamespaceURI == "") {
  4249. ob.@MaxOccursString = Reader.Value;
  4250. }
  4251. else if (IsXmlnsAttribute (Reader.Name)) {
  4252. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  4253. if (Reader.Prefix == "xmlns")
  4254. [email protected] (Reader.LocalName, Reader.Value);
  4255. else
  4256. [email protected] ("", Reader.Value);
  4257. }
  4258. else {
  4259. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  4260. ParseWsdlArrayType (attr);
  4261. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  4262. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  4263. anyAttributeIndex++;
  4264. }
  4265. }
  4266. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  4267. ob.@UnhandledAttributes = anyAttributeArray;
  4268. #if NET_2_0
  4269. ServiceDescription.SetExtensibleAttributes (ob);
  4270. #endif
  4271. Reader.MoveToElement();
  4272. if (Reader.IsEmptyElement) {
  4273. Reader.Skip ();
  4274. return ob;
  4275. }
  4276. Reader.ReadStartElement();
  4277. Reader.MoveToContent();
  4278. bool b118=false, b119=false;
  4279. System.Xml.Schema.XmlSchemaObjectCollection o121;
  4280. o121 = ob.@Items;
  4281. int n120=0;
  4282. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  4283. {
  4284. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  4285. {
  4286. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b118) {
  4287. b118 = true;
  4288. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  4289. }
  4290. else if (Reader.LocalName == "element" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b119) {
  4291. if (((object)o121) == null)
  4292. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  4293. o121.Add (ReadObject_XmlSchemaElement (false, true));
  4294. n120++;
  4295. }
  4296. else {
  4297. UnknownNode (ob);
  4298. }
  4299. }
  4300. else
  4301. UnknownNode(ob);
  4302. Reader.MoveToContent();
  4303. }
  4304. ReadEndElement();
  4305. return ob;
  4306. }
  4307. public System.Xml.Schema.XmlSchemaContent ReadObject_XmlSchemaContent (bool isNullable, bool checkType)
  4308. {
  4309. System.Xml.Schema.XmlSchemaContent ob = null;
  4310. if (isNullable && ReadNull()) return null;
  4311. if (checkType)
  4312. {
  4313. System.Xml.XmlQualifiedName t = GetXsiType();
  4314. if (t == null)
  4315. { }
  4316. else if (t.Name == "XmlSchemaComplexContentExtension" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  4317. return ReadObject_XmlSchemaComplexContentExtension (isNullable, checkType);
  4318. else if (t.Name == "XmlSchemaComplexContentRestriction" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  4319. return ReadObject_XmlSchemaComplexContentRestriction (isNullable, checkType);
  4320. else if (t.Name == "XmlSchemaSimpleContentExtension" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  4321. return ReadObject_XmlSchemaSimpleContentExtension (isNullable, checkType);
  4322. else if (t.Name == "XmlSchemaSimpleContentRestriction" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  4323. return ReadObject_XmlSchemaSimpleContentRestriction (isNullable, checkType);
  4324. else if (t.Name != "XmlSchemaContent" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  4325. throw CreateUnknownTypeException(t);
  4326. }
  4327. return ob;
  4328. }
  4329. public System.Xml.Schema.XmlSchemaComplexContentExtension ReadObject_XmlSchemaComplexContentExtension (bool isNullable, bool checkType)
  4330. {
  4331. System.Xml.Schema.XmlSchemaComplexContentExtension ob = null;
  4332. if (isNullable && ReadNull()) return null;
  4333. if (checkType)
  4334. {
  4335. System.Xml.XmlQualifiedName t = GetXsiType();
  4336. if (t == null)
  4337. { }
  4338. else if (t.Name != "XmlSchemaComplexContentExtension" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  4339. throw CreateUnknownTypeException(t);
  4340. }
  4341. ob = new System.Xml.Schema.XmlSchemaComplexContentExtension ();
  4342. Reader.MoveToElement();
  4343. int anyAttributeIndex = 0;
  4344. System.Xml.XmlAttribute[] anyAttributeArray = null;
  4345. while (Reader.MoveToNextAttribute())
  4346. {
  4347. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  4348. ob.@Id = Reader.Value;
  4349. }
  4350. else if (Reader.LocalName == "base" && Reader.NamespaceURI == "") {
  4351. ob.@BaseTypeName = ToXmlQualifiedName (Reader.Value);
  4352. }
  4353. else if (IsXmlnsAttribute (Reader.Name)) {
  4354. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  4355. if (Reader.Prefix == "xmlns")
  4356. [email protected] (Reader.LocalName, Reader.Value);
  4357. else
  4358. [email protected] ("", Reader.Value);
  4359. }
  4360. else {
  4361. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  4362. ParseWsdlArrayType (attr);
  4363. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  4364. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  4365. anyAttributeIndex++;
  4366. }
  4367. }
  4368. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  4369. ob.@UnhandledAttributes = anyAttributeArray;
  4370. #if NET_2_0
  4371. ServiceDescription.SetExtensibleAttributes (ob);
  4372. #endif
  4373. Reader.MoveToElement();
  4374. if (Reader.IsEmptyElement) {
  4375. Reader.Skip ();
  4376. return ob;
  4377. }
  4378. Reader.ReadStartElement();
  4379. Reader.MoveToContent();
  4380. bool b122=false, b123=false, b124=false, b125=false;
  4381. System.Xml.Schema.XmlSchemaObjectCollection o127;
  4382. o127 = ob.@Attributes;
  4383. int n126=0;
  4384. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  4385. {
  4386. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  4387. {
  4388. if (Reader.LocalName == "choice" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b123) {
  4389. b123 = true;
  4390. ob.@Particle = ReadObject_XmlSchemaChoice (false, true);
  4391. }
  4392. else if (Reader.LocalName == "attribute" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b124) {
  4393. if (((object)o127) == null)
  4394. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  4395. o127.Add (ReadObject_XmlSchemaAttribute (false, true));
  4396. n126++;
  4397. }
  4398. else if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b122) {
  4399. b122 = true;
  4400. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  4401. }
  4402. else if (Reader.LocalName == "all" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b123) {
  4403. b123 = true;
  4404. ob.@Particle = ReadObject_XmlSchemaAll (false, true);
  4405. }
  4406. else if (Reader.LocalName == "sequence" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b123) {
  4407. b123 = true;
  4408. ob.@Particle = ReadObject_XmlSchemaSequence (false, true);
  4409. }
  4410. else if (Reader.LocalName == "anyAttribute" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b125) {
  4411. b125 = true;
  4412. ob.@AnyAttribute = ReadObject_XmlSchemaAnyAttribute (false, true);
  4413. }
  4414. else if (Reader.LocalName == "attributeGroup" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b124) {
  4415. if (((object)o127) == null)
  4416. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  4417. o127.Add (ReadObject_XmlSchemaAttributeGroupRef (false, true));
  4418. n126++;
  4419. }
  4420. else if (Reader.LocalName == "group" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b123) {
  4421. b123 = true;
  4422. ob.@Particle = ReadObject_XmlSchemaGroupRef (false, true);
  4423. }
  4424. else {
  4425. UnknownNode (ob);
  4426. }
  4427. }
  4428. else
  4429. UnknownNode(ob);
  4430. Reader.MoveToContent();
  4431. }
  4432. ReadEndElement();
  4433. return ob;
  4434. }
  4435. public System.Xml.Schema.XmlSchemaComplexContentRestriction ReadObject_XmlSchemaComplexContentRestriction (bool isNullable, bool checkType)
  4436. {
  4437. System.Xml.Schema.XmlSchemaComplexContentRestriction ob = null;
  4438. if (isNullable && ReadNull()) return null;
  4439. if (checkType)
  4440. {
  4441. System.Xml.XmlQualifiedName t = GetXsiType();
  4442. if (t == null)
  4443. { }
  4444. else if (t.Name != "XmlSchemaComplexContentRestriction" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  4445. throw CreateUnknownTypeException(t);
  4446. }
  4447. ob = new System.Xml.Schema.XmlSchemaComplexContentRestriction ();
  4448. Reader.MoveToElement();
  4449. int anyAttributeIndex = 0;
  4450. System.Xml.XmlAttribute[] anyAttributeArray = null;
  4451. while (Reader.MoveToNextAttribute())
  4452. {
  4453. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  4454. ob.@Id = Reader.Value;
  4455. }
  4456. else if (Reader.LocalName == "base" && Reader.NamespaceURI == "") {
  4457. ob.@BaseTypeName = ToXmlQualifiedName (Reader.Value);
  4458. }
  4459. else if (IsXmlnsAttribute (Reader.Name)) {
  4460. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  4461. if (Reader.Prefix == "xmlns")
  4462. [email protected] (Reader.LocalName, Reader.Value);
  4463. else
  4464. [email protected] ("", Reader.Value);
  4465. }
  4466. else {
  4467. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  4468. ParseWsdlArrayType (attr);
  4469. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  4470. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  4471. anyAttributeIndex++;
  4472. }
  4473. }
  4474. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  4475. ob.@UnhandledAttributes = anyAttributeArray;
  4476. #if NET_2_0
  4477. ServiceDescription.SetExtensibleAttributes (ob);
  4478. #endif
  4479. Reader.MoveToElement();
  4480. if (Reader.IsEmptyElement) {
  4481. Reader.Skip ();
  4482. return ob;
  4483. }
  4484. Reader.ReadStartElement();
  4485. Reader.MoveToContent();
  4486. bool b128=false, b129=false, b130=false, b131=false;
  4487. System.Xml.Schema.XmlSchemaObjectCollection o133;
  4488. o133 = ob.@Attributes;
  4489. int n132=0;
  4490. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  4491. {
  4492. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  4493. {
  4494. if (Reader.LocalName == "choice" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b129) {
  4495. b129 = true;
  4496. ob.@Particle = ReadObject_XmlSchemaChoice (false, true);
  4497. }
  4498. else if (Reader.LocalName == "attribute" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b130) {
  4499. if (((object)o133) == null)
  4500. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  4501. o133.Add (ReadObject_XmlSchemaAttribute (false, true));
  4502. n132++;
  4503. }
  4504. else if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b128) {
  4505. b128 = true;
  4506. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  4507. }
  4508. else if (Reader.LocalName == "all" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b129) {
  4509. b129 = true;
  4510. ob.@Particle = ReadObject_XmlSchemaAll (false, true);
  4511. }
  4512. else if (Reader.LocalName == "sequence" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b129) {
  4513. b129 = true;
  4514. ob.@Particle = ReadObject_XmlSchemaSequence (false, true);
  4515. }
  4516. else if (Reader.LocalName == "anyAttribute" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b131) {
  4517. b131 = true;
  4518. ob.@AnyAttribute = ReadObject_XmlSchemaAnyAttribute (false, true);
  4519. }
  4520. else if (Reader.LocalName == "attributeGroup" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b130) {
  4521. if (((object)o133) == null)
  4522. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  4523. o133.Add (ReadObject_XmlSchemaAttributeGroupRef (false, true));
  4524. n132++;
  4525. }
  4526. else if (Reader.LocalName == "group" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b129) {
  4527. b129 = true;
  4528. ob.@Particle = ReadObject_XmlSchemaGroupRef (false, true);
  4529. }
  4530. else {
  4531. UnknownNode (ob);
  4532. }
  4533. }
  4534. else
  4535. UnknownNode(ob);
  4536. Reader.MoveToContent();
  4537. }
  4538. ReadEndElement();
  4539. return ob;
  4540. }
  4541. public System.Xml.Schema.XmlSchemaContentModel ReadObject_XmlSchemaContentModel (bool isNullable, bool checkType)
  4542. {
  4543. System.Xml.Schema.XmlSchemaContentModel ob = null;
  4544. if (isNullable && ReadNull()) return null;
  4545. if (checkType)
  4546. {
  4547. System.Xml.XmlQualifiedName t = GetXsiType();
  4548. if (t == null)
  4549. { }
  4550. else if (t.Name == "XmlSchemaComplexContent" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  4551. return ReadObject_XmlSchemaComplexContent (isNullable, checkType);
  4552. else if (t.Name == "XmlSchemaSimpleContent" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  4553. return ReadObject_XmlSchemaSimpleContent (isNullable, checkType);
  4554. else if (t.Name != "XmlSchemaContentModel" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  4555. throw CreateUnknownTypeException(t);
  4556. }
  4557. return ob;
  4558. }
  4559. public System.Xml.Schema.XmlSchemaComplexContent ReadObject_XmlSchemaComplexContent (bool isNullable, bool checkType)
  4560. {
  4561. System.Xml.Schema.XmlSchemaComplexContent ob = null;
  4562. if (isNullable && ReadNull()) return null;
  4563. if (checkType)
  4564. {
  4565. System.Xml.XmlQualifiedName t = GetXsiType();
  4566. if (t == null)
  4567. { }
  4568. else if (t.Name != "XmlSchemaComplexContent" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  4569. throw CreateUnknownTypeException(t);
  4570. }
  4571. ob = new System.Xml.Schema.XmlSchemaComplexContent ();
  4572. Reader.MoveToElement();
  4573. int anyAttributeIndex = 0;
  4574. System.Xml.XmlAttribute[] anyAttributeArray = null;
  4575. while (Reader.MoveToNextAttribute())
  4576. {
  4577. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  4578. ob.@Id = Reader.Value;
  4579. }
  4580. else if (Reader.LocalName == "mixed" && Reader.NamespaceURI == "") {
  4581. ob.@IsMixed = XmlConvert.ToBoolean (Reader.Value);
  4582. }
  4583. else if (IsXmlnsAttribute (Reader.Name)) {
  4584. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  4585. if (Reader.Prefix == "xmlns")
  4586. [email protected] (Reader.LocalName, Reader.Value);
  4587. else
  4588. [email protected] ("", Reader.Value);
  4589. }
  4590. else {
  4591. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  4592. ParseWsdlArrayType (attr);
  4593. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  4594. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  4595. anyAttributeIndex++;
  4596. }
  4597. }
  4598. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  4599. ob.@UnhandledAttributes = anyAttributeArray;
  4600. #if NET_2_0
  4601. ServiceDescription.SetExtensibleAttributes (ob);
  4602. #endif
  4603. Reader.MoveToElement();
  4604. if (Reader.IsEmptyElement) {
  4605. Reader.Skip ();
  4606. return ob;
  4607. }
  4608. Reader.ReadStartElement();
  4609. Reader.MoveToContent();
  4610. bool b134=false, b135=false;
  4611. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  4612. {
  4613. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  4614. {
  4615. if (Reader.LocalName == "extension" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b135) {
  4616. b135 = true;
  4617. ob.@Content = ReadObject_XmlSchemaComplexContentExtension (false, true);
  4618. }
  4619. else if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b134) {
  4620. b134 = true;
  4621. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  4622. }
  4623. else if (Reader.LocalName == "restriction" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b135) {
  4624. b135 = true;
  4625. ob.@Content = ReadObject_XmlSchemaComplexContentRestriction (false, true);
  4626. }
  4627. else {
  4628. UnknownNode (ob);
  4629. }
  4630. }
  4631. else
  4632. UnknownNode(ob);
  4633. Reader.MoveToContent();
  4634. }
  4635. ReadEndElement();
  4636. return ob;
  4637. }
  4638. public System.Xml.Schema.XmlSchemaSimpleContentExtension ReadObject_XmlSchemaSimpleContentExtension (bool isNullable, bool checkType)
  4639. {
  4640. System.Xml.Schema.XmlSchemaSimpleContentExtension ob = null;
  4641. if (isNullable && ReadNull()) return null;
  4642. if (checkType)
  4643. {
  4644. System.Xml.XmlQualifiedName t = GetXsiType();
  4645. if (t == null)
  4646. { }
  4647. else if (t.Name != "XmlSchemaSimpleContentExtension" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  4648. throw CreateUnknownTypeException(t);
  4649. }
  4650. ob = new System.Xml.Schema.XmlSchemaSimpleContentExtension ();
  4651. Reader.MoveToElement();
  4652. int anyAttributeIndex = 0;
  4653. System.Xml.XmlAttribute[] anyAttributeArray = null;
  4654. while (Reader.MoveToNextAttribute())
  4655. {
  4656. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  4657. ob.@Id = Reader.Value;
  4658. }
  4659. else if (Reader.LocalName == "base" && Reader.NamespaceURI == "") {
  4660. ob.@BaseTypeName = ToXmlQualifiedName (Reader.Value);
  4661. }
  4662. else if (IsXmlnsAttribute (Reader.Name)) {
  4663. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  4664. if (Reader.Prefix == "xmlns")
  4665. [email protected] (Reader.LocalName, Reader.Value);
  4666. else
  4667. [email protected] ("", Reader.Value);
  4668. }
  4669. else {
  4670. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  4671. ParseWsdlArrayType (attr);
  4672. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  4673. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  4674. anyAttributeIndex++;
  4675. }
  4676. }
  4677. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  4678. ob.@UnhandledAttributes = anyAttributeArray;
  4679. #if NET_2_0
  4680. ServiceDescription.SetExtensibleAttributes (ob);
  4681. #endif
  4682. Reader.MoveToElement();
  4683. if (Reader.IsEmptyElement) {
  4684. Reader.Skip ();
  4685. return ob;
  4686. }
  4687. Reader.ReadStartElement();
  4688. Reader.MoveToContent();
  4689. bool b136=false, b137=false, b138=false;
  4690. System.Xml.Schema.XmlSchemaObjectCollection o140;
  4691. o140 = ob.@Attributes;
  4692. int n139=0;
  4693. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  4694. {
  4695. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  4696. {
  4697. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b136) {
  4698. b136 = true;
  4699. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  4700. }
  4701. else if (Reader.LocalName == "anyAttribute" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b138) {
  4702. b138 = true;
  4703. ob.@AnyAttribute = ReadObject_XmlSchemaAnyAttribute (false, true);
  4704. }
  4705. else if (Reader.LocalName == "attribute" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b137) {
  4706. if (((object)o140) == null)
  4707. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  4708. o140.Add (ReadObject_XmlSchemaAttribute (false, true));
  4709. n139++;
  4710. }
  4711. else if (Reader.LocalName == "attributeGroup" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b137) {
  4712. if (((object)o140) == null)
  4713. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  4714. o140.Add (ReadObject_XmlSchemaAttributeGroupRef (false, true));
  4715. n139++;
  4716. }
  4717. else {
  4718. UnknownNode (ob);
  4719. }
  4720. }
  4721. else
  4722. UnknownNode(ob);
  4723. Reader.MoveToContent();
  4724. }
  4725. ReadEndElement();
  4726. return ob;
  4727. }
  4728. public System.Xml.Schema.XmlSchemaSimpleContentRestriction ReadObject_XmlSchemaSimpleContentRestriction (bool isNullable, bool checkType)
  4729. {
  4730. System.Xml.Schema.XmlSchemaSimpleContentRestriction ob = null;
  4731. if (isNullable && ReadNull()) return null;
  4732. if (checkType)
  4733. {
  4734. System.Xml.XmlQualifiedName t = GetXsiType();
  4735. if (t == null)
  4736. { }
  4737. else if (t.Name != "XmlSchemaSimpleContentRestriction" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  4738. throw CreateUnknownTypeException(t);
  4739. }
  4740. ob = new System.Xml.Schema.XmlSchemaSimpleContentRestriction ();
  4741. Reader.MoveToElement();
  4742. int anyAttributeIndex = 0;
  4743. System.Xml.XmlAttribute[] anyAttributeArray = null;
  4744. while (Reader.MoveToNextAttribute())
  4745. {
  4746. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  4747. ob.@Id = Reader.Value;
  4748. }
  4749. else if (Reader.LocalName == "base" && Reader.NamespaceURI == "") {
  4750. ob.@BaseTypeName = ToXmlQualifiedName (Reader.Value);
  4751. }
  4752. else if (IsXmlnsAttribute (Reader.Name)) {
  4753. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  4754. if (Reader.Prefix == "xmlns")
  4755. [email protected] (Reader.LocalName, Reader.Value);
  4756. else
  4757. [email protected] ("", Reader.Value);
  4758. }
  4759. else {
  4760. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  4761. ParseWsdlArrayType (attr);
  4762. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  4763. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  4764. anyAttributeIndex++;
  4765. }
  4766. }
  4767. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  4768. ob.@UnhandledAttributes = anyAttributeArray;
  4769. #if NET_2_0
  4770. ServiceDescription.SetExtensibleAttributes (ob);
  4771. #endif
  4772. Reader.MoveToElement();
  4773. if (Reader.IsEmptyElement) {
  4774. Reader.Skip ();
  4775. return ob;
  4776. }
  4777. Reader.ReadStartElement();
  4778. Reader.MoveToContent();
  4779. bool b141=false, b142=false, b143=false, b144=false, b145=false;
  4780. System.Xml.Schema.XmlSchemaObjectCollection o147;
  4781. o147 = ob.@Facets;
  4782. System.Xml.Schema.XmlSchemaObjectCollection o149;
  4783. o149 = ob.@Attributes;
  4784. int n146=0, n148=0;
  4785. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  4786. {
  4787. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  4788. {
  4789. if (Reader.LocalName == "enumeration" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b143) {
  4790. if (((object)o147) == null)
  4791. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  4792. o147.Add (ReadObject_XmlSchemaEnumerationFacet (false, true));
  4793. n146++;
  4794. }
  4795. else if (Reader.LocalName == "attribute" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b144) {
  4796. if (((object)o149) == null)
  4797. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  4798. o149.Add (ReadObject_XmlSchemaAttribute (false, true));
  4799. n148++;
  4800. }
  4801. else if (Reader.LocalName == "pattern" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b143) {
  4802. if (((object)o147) == null)
  4803. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  4804. o147.Add (ReadObject_XmlSchemaPatternFacet (false, true));
  4805. n146++;
  4806. }
  4807. else if (Reader.LocalName == "anyAttribute" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b145) {
  4808. b145 = true;
  4809. ob.@AnyAttribute = ReadObject_XmlSchemaAnyAttribute (false, true);
  4810. }
  4811. else if (Reader.LocalName == "maxInclusive" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b143) {
  4812. if (((object)o147) == null)
  4813. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  4814. o147.Add (ReadObject_XmlSchemaMaxInclusiveFacet (false, true));
  4815. n146++;
  4816. }
  4817. else if (Reader.LocalName == "minLength" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b143) {
  4818. if (((object)o147) == null)
  4819. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  4820. o147.Add (ReadObject_XmlSchemaMinLengthFacet (false, true));
  4821. n146++;
  4822. }
  4823. else if (Reader.LocalName == "minInclusive" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b143) {
  4824. if (((object)o147) == null)
  4825. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  4826. o147.Add (ReadObject_XmlSchemaMinInclusiveFacet (false, true));
  4827. n146++;
  4828. }
  4829. else if (Reader.LocalName == "length" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b143) {
  4830. if (((object)o147) == null)
  4831. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  4832. o147.Add (ReadObject_XmlSchemaLengthFacet (false, true));
  4833. n146++;
  4834. }
  4835. else if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b141) {
  4836. b141 = true;
  4837. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  4838. }
  4839. else if (Reader.LocalName == "attributeGroup" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b144) {
  4840. if (((object)o149) == null)
  4841. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  4842. o149.Add (ReadObject_XmlSchemaAttributeGroupRef (false, true));
  4843. n148++;
  4844. }
  4845. else if (Reader.LocalName == "totalDigits" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b143) {
  4846. if (((object)o147) == null)
  4847. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  4848. o147.Add (ReadObject_XmlSchemaTotalDigitsFacet (false, true));
  4849. n146++;
  4850. }
  4851. else if (Reader.LocalName == "maxLength" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b143) {
  4852. if (((object)o147) == null)
  4853. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  4854. o147.Add (ReadObject_XmlSchemaMaxLengthFacet (false, true));
  4855. n146++;
  4856. }
  4857. else if (Reader.LocalName == "minExclusive" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b143) {
  4858. if (((object)o147) == null)
  4859. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  4860. o147.Add (ReadObject_XmlSchemaMinExclusiveFacet (false, true));
  4861. n146++;
  4862. }
  4863. else if (Reader.LocalName == "fractionDigits" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b143) {
  4864. if (((object)o147) == null)
  4865. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  4866. o147.Add (ReadObject_XmlSchemaFractionDigitsFacet (false, true));
  4867. n146++;
  4868. }
  4869. else if (Reader.LocalName == "simpleType" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b142) {
  4870. b142 = true;
  4871. ob.@BaseType = ReadObject_XmlSchemaSimpleType (false, true);
  4872. }
  4873. else if (Reader.LocalName == "whiteSpace" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b143) {
  4874. if (((object)o147) == null)
  4875. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  4876. o147.Add (ReadObject_XmlSchemaWhiteSpaceFacet (false, true));
  4877. n146++;
  4878. }
  4879. else if (Reader.LocalName == "maxExclusive" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b143) {
  4880. if (((object)o147) == null)
  4881. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  4882. o147.Add (ReadObject_XmlSchemaMaxExclusiveFacet (false, true));
  4883. n146++;
  4884. }
  4885. else {
  4886. UnknownNode (ob);
  4887. }
  4888. }
  4889. else
  4890. UnknownNode(ob);
  4891. Reader.MoveToContent();
  4892. }
  4893. ReadEndElement();
  4894. return ob;
  4895. }
  4896. public System.Xml.Schema.XmlSchemaSimpleContent ReadObject_XmlSchemaSimpleContent (bool isNullable, bool checkType)
  4897. {
  4898. System.Xml.Schema.XmlSchemaSimpleContent ob = null;
  4899. if (isNullable && ReadNull()) return null;
  4900. if (checkType)
  4901. {
  4902. System.Xml.XmlQualifiedName t = GetXsiType();
  4903. if (t == null)
  4904. { }
  4905. else if (t.Name != "XmlSchemaSimpleContent" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  4906. throw CreateUnknownTypeException(t);
  4907. }
  4908. ob = new System.Xml.Schema.XmlSchemaSimpleContent ();
  4909. Reader.MoveToElement();
  4910. int anyAttributeIndex = 0;
  4911. System.Xml.XmlAttribute[] anyAttributeArray = null;
  4912. while (Reader.MoveToNextAttribute())
  4913. {
  4914. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  4915. ob.@Id = Reader.Value;
  4916. }
  4917. else if (IsXmlnsAttribute (Reader.Name)) {
  4918. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  4919. if (Reader.Prefix == "xmlns")
  4920. [email protected] (Reader.LocalName, Reader.Value);
  4921. else
  4922. [email protected] ("", Reader.Value);
  4923. }
  4924. else {
  4925. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  4926. ParseWsdlArrayType (attr);
  4927. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  4928. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  4929. anyAttributeIndex++;
  4930. }
  4931. }
  4932. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  4933. ob.@UnhandledAttributes = anyAttributeArray;
  4934. #if NET_2_0
  4935. ServiceDescription.SetExtensibleAttributes (ob);
  4936. #endif
  4937. Reader.MoveToElement();
  4938. if (Reader.IsEmptyElement) {
  4939. Reader.Skip ();
  4940. return ob;
  4941. }
  4942. Reader.ReadStartElement();
  4943. Reader.MoveToContent();
  4944. bool b150=false, b151=false;
  4945. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  4946. {
  4947. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  4948. {
  4949. if (Reader.LocalName == "extension" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b151) {
  4950. b151 = true;
  4951. ob.@Content = ReadObject_XmlSchemaSimpleContentExtension (false, true);
  4952. }
  4953. else if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b150) {
  4954. b150 = true;
  4955. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  4956. }
  4957. else if (Reader.LocalName == "restriction" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b151) {
  4958. b151 = true;
  4959. ob.@Content = ReadObject_XmlSchemaSimpleContentRestriction (false, true);
  4960. }
  4961. else {
  4962. UnknownNode (ob);
  4963. }
  4964. }
  4965. else
  4966. UnknownNode(ob);
  4967. Reader.MoveToContent();
  4968. }
  4969. ReadEndElement();
  4970. return ob;
  4971. }
  4972. public System.Xml.Schema.XmlSchemaComplexType ReadObject_XmlSchemaComplexType (bool isNullable, bool checkType)
  4973. {
  4974. System.Xml.Schema.XmlSchemaComplexType ob = null;
  4975. if (isNullable && ReadNull()) return null;
  4976. if (checkType)
  4977. {
  4978. System.Xml.XmlQualifiedName t = GetXsiType();
  4979. if (t == null)
  4980. { }
  4981. else if (t.Name != "XmlSchemaComplexType" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  4982. throw CreateUnknownTypeException(t);
  4983. }
  4984. ob = new System.Xml.Schema.XmlSchemaComplexType ();
  4985. Reader.MoveToElement();
  4986. ob.@Final = ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None);
  4987. ob.@IsAbstract = false;
  4988. ob.@Block = ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None);
  4989. ob.@IsMixed = false;
  4990. int anyAttributeIndex = 0;
  4991. System.Xml.XmlAttribute[] anyAttributeArray = null;
  4992. while (Reader.MoveToNextAttribute())
  4993. {
  4994. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  4995. ob.@Id = Reader.Value;
  4996. }
  4997. else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  4998. ob.@Name = Reader.Value;
  4999. }
  5000. else if (Reader.LocalName == "final" && Reader.NamespaceURI == "") {
  5001. ob.@Final = GetEnumValue_XmlSchemaDerivationMethod (Reader.Value);
  5002. }
  5003. else if (Reader.LocalName == "abstract" && Reader.NamespaceURI == "") {
  5004. ob.@IsAbstract = XmlConvert.ToBoolean (Reader.Value);
  5005. }
  5006. else if (Reader.LocalName == "block" && Reader.NamespaceURI == "") {
  5007. ob.@Block = GetEnumValue_XmlSchemaDerivationMethod (Reader.Value);
  5008. }
  5009. else if (Reader.LocalName == "mixed" && Reader.NamespaceURI == "") {
  5010. ob.@IsMixed = XmlConvert.ToBoolean (Reader.Value);
  5011. }
  5012. else if (IsXmlnsAttribute (Reader.Name)) {
  5013. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  5014. if (Reader.Prefix == "xmlns")
  5015. [email protected] (Reader.LocalName, Reader.Value);
  5016. else
  5017. [email protected] ("", Reader.Value);
  5018. }
  5019. else {
  5020. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  5021. ParseWsdlArrayType (attr);
  5022. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  5023. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  5024. anyAttributeIndex++;
  5025. }
  5026. }
  5027. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  5028. ob.@UnhandledAttributes = anyAttributeArray;
  5029. #if NET_2_0
  5030. ServiceDescription.SetExtensibleAttributes (ob);
  5031. #endif
  5032. Reader.MoveToElement();
  5033. if (Reader.IsEmptyElement) {
  5034. Reader.Skip ();
  5035. return ob;
  5036. }
  5037. Reader.ReadStartElement();
  5038. Reader.MoveToContent();
  5039. bool b152=false, b153=false, b154=false, b155=false, b156=false;
  5040. System.Xml.Schema.XmlSchemaObjectCollection o158;
  5041. o158 = ob.@Attributes;
  5042. int n157=0;
  5043. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  5044. {
  5045. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  5046. {
  5047. if (Reader.LocalName == "sequence" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b154) {
  5048. b154 = true;
  5049. ob.@Particle = ReadObject_XmlSchemaSequence (false, true);
  5050. }
  5051. else if (Reader.LocalName == "simpleContent" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b153) {
  5052. b153 = true;
  5053. ob.@ContentModel = ReadObject_XmlSchemaSimpleContent (false, true);
  5054. }
  5055. else if (Reader.LocalName == "attribute" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b155) {
  5056. if (((object)o158) == null)
  5057. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  5058. o158.Add (ReadObject_XmlSchemaAttribute (false, true));
  5059. n157++;
  5060. }
  5061. else if (Reader.LocalName == "anyAttribute" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b156) {
  5062. b156 = true;
  5063. ob.@AnyAttribute = ReadObject_XmlSchemaAnyAttribute (false, true);
  5064. }
  5065. else if (Reader.LocalName == "choice" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b154) {
  5066. b154 = true;
  5067. ob.@Particle = ReadObject_XmlSchemaChoice (false, true);
  5068. }
  5069. else if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b152) {
  5070. b152 = true;
  5071. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  5072. }
  5073. else if (Reader.LocalName == "attributeGroup" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b155) {
  5074. if (((object)o158) == null)
  5075. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  5076. o158.Add (ReadObject_XmlSchemaAttributeGroupRef (false, true));
  5077. n157++;
  5078. }
  5079. else if (Reader.LocalName == "complexContent" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b153) {
  5080. b153 = true;
  5081. ob.@ContentModel = ReadObject_XmlSchemaComplexContent (false, true);
  5082. }
  5083. else if (Reader.LocalName == "group" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b154) {
  5084. b154 = true;
  5085. ob.@Particle = ReadObject_XmlSchemaGroupRef (false, true);
  5086. }
  5087. else if (Reader.LocalName == "all" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b154) {
  5088. b154 = true;
  5089. ob.@Particle = ReadObject_XmlSchemaAll (false, true);
  5090. }
  5091. else {
  5092. UnknownNode (ob);
  5093. }
  5094. }
  5095. else
  5096. UnknownNode(ob);
  5097. Reader.MoveToContent();
  5098. }
  5099. ReadEndElement();
  5100. return ob;
  5101. }
  5102. public System.Xml.Schema.XmlSchemaXPath ReadObject_XmlSchemaXPath (bool isNullable, bool checkType)
  5103. {
  5104. System.Xml.Schema.XmlSchemaXPath ob = null;
  5105. if (isNullable && ReadNull()) return null;
  5106. if (checkType)
  5107. {
  5108. System.Xml.XmlQualifiedName t = GetXsiType();
  5109. if (t == null)
  5110. { }
  5111. else if (t.Name != "XmlSchemaXPath" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  5112. throw CreateUnknownTypeException(t);
  5113. }
  5114. ob = new System.Xml.Schema.XmlSchemaXPath ();
  5115. Reader.MoveToElement();
  5116. ob.@XPath = "";
  5117. int anyAttributeIndex = 0;
  5118. System.Xml.XmlAttribute[] anyAttributeArray = null;
  5119. while (Reader.MoveToNextAttribute())
  5120. {
  5121. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  5122. ob.@Id = Reader.Value;
  5123. }
  5124. else if (Reader.LocalName == "xpath" && Reader.NamespaceURI == "") {
  5125. ob.@XPath = Reader.Value;
  5126. }
  5127. else if (IsXmlnsAttribute (Reader.Name)) {
  5128. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  5129. if (Reader.Prefix == "xmlns")
  5130. [email protected] (Reader.LocalName, Reader.Value);
  5131. else
  5132. [email protected] ("", Reader.Value);
  5133. }
  5134. else {
  5135. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  5136. ParseWsdlArrayType (attr);
  5137. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  5138. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  5139. anyAttributeIndex++;
  5140. }
  5141. }
  5142. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  5143. ob.@UnhandledAttributes = anyAttributeArray;
  5144. #if NET_2_0
  5145. ServiceDescription.SetExtensibleAttributes (ob);
  5146. #endif
  5147. Reader.MoveToElement();
  5148. if (Reader.IsEmptyElement) {
  5149. Reader.Skip ();
  5150. return ob;
  5151. }
  5152. Reader.ReadStartElement();
  5153. Reader.MoveToContent();
  5154. bool b159=false;
  5155. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  5156. {
  5157. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  5158. {
  5159. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b159) {
  5160. b159 = true;
  5161. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  5162. }
  5163. else {
  5164. UnknownNode (ob);
  5165. }
  5166. }
  5167. else
  5168. UnknownNode(ob);
  5169. Reader.MoveToContent();
  5170. }
  5171. ReadEndElement();
  5172. return ob;
  5173. }
  5174. public System.Xml.Schema.XmlSchemaIdentityConstraint ReadObject_XmlSchemaIdentityConstraint (bool isNullable, bool checkType)
  5175. {
  5176. System.Xml.Schema.XmlSchemaIdentityConstraint ob = null;
  5177. if (isNullable && ReadNull()) return null;
  5178. if (checkType)
  5179. {
  5180. System.Xml.XmlQualifiedName t = GetXsiType();
  5181. if (t == null)
  5182. { }
  5183. else if (t.Name == "XmlSchemaKeyref" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  5184. return ReadObject_XmlSchemaKeyref (isNullable, checkType);
  5185. else if (t.Name == "XmlSchemaKey" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  5186. return ReadObject_XmlSchemaKey (isNullable, checkType);
  5187. else if (t.Name == "XmlSchemaUnique" && t.Namespace == "http://www.w3.org/2001/XMLSchema")
  5188. return ReadObject_XmlSchemaUnique (isNullable, checkType);
  5189. else if (t.Name != "XmlSchemaIdentityConstraint" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  5190. throw CreateUnknownTypeException(t);
  5191. }
  5192. ob = new System.Xml.Schema.XmlSchemaIdentityConstraint ();
  5193. Reader.MoveToElement();
  5194. int anyAttributeIndex = 0;
  5195. System.Xml.XmlAttribute[] anyAttributeArray = null;
  5196. while (Reader.MoveToNextAttribute())
  5197. {
  5198. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  5199. ob.@Id = Reader.Value;
  5200. }
  5201. else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  5202. ob.@Name = Reader.Value;
  5203. }
  5204. else if (IsXmlnsAttribute (Reader.Name)) {
  5205. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  5206. if (Reader.Prefix == "xmlns")
  5207. [email protected] (Reader.LocalName, Reader.Value);
  5208. else
  5209. [email protected] ("", Reader.Value);
  5210. }
  5211. else {
  5212. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  5213. ParseWsdlArrayType (attr);
  5214. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  5215. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  5216. anyAttributeIndex++;
  5217. }
  5218. }
  5219. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  5220. ob.@UnhandledAttributes = anyAttributeArray;
  5221. #if NET_2_0
  5222. ServiceDescription.SetExtensibleAttributes (ob);
  5223. #endif
  5224. Reader.MoveToElement();
  5225. if (Reader.IsEmptyElement) {
  5226. Reader.Skip ();
  5227. return ob;
  5228. }
  5229. Reader.ReadStartElement();
  5230. Reader.MoveToContent();
  5231. bool b160=false, b161=false, b162=false;
  5232. System.Xml.Schema.XmlSchemaObjectCollection o164;
  5233. o164 = ob.@Fields;
  5234. int n163=0;
  5235. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  5236. {
  5237. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  5238. {
  5239. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b160) {
  5240. b160 = true;
  5241. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  5242. }
  5243. else if (Reader.LocalName == "selector" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b161) {
  5244. b161 = true;
  5245. ob.@Selector = ReadObject_XmlSchemaXPath (false, true);
  5246. }
  5247. else if (Reader.LocalName == "field" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b162) {
  5248. if (((object)o164) == null)
  5249. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  5250. o164.Add (ReadObject_XmlSchemaXPath (false, true));
  5251. n163++;
  5252. }
  5253. else {
  5254. UnknownNode (ob);
  5255. }
  5256. }
  5257. else
  5258. UnknownNode(ob);
  5259. Reader.MoveToContent();
  5260. }
  5261. ReadEndElement();
  5262. return ob;
  5263. }
  5264. public System.Xml.Schema.XmlSchemaKeyref ReadObject_XmlSchemaKeyref (bool isNullable, bool checkType)
  5265. {
  5266. System.Xml.Schema.XmlSchemaKeyref ob = null;
  5267. if (isNullable && ReadNull()) return null;
  5268. if (checkType)
  5269. {
  5270. System.Xml.XmlQualifiedName t = GetXsiType();
  5271. if (t == null)
  5272. { }
  5273. else if (t.Name != "XmlSchemaKeyref" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  5274. throw CreateUnknownTypeException(t);
  5275. }
  5276. ob = new System.Xml.Schema.XmlSchemaKeyref ();
  5277. Reader.MoveToElement();
  5278. int anyAttributeIndex = 0;
  5279. System.Xml.XmlAttribute[] anyAttributeArray = null;
  5280. while (Reader.MoveToNextAttribute())
  5281. {
  5282. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  5283. ob.@Id = Reader.Value;
  5284. }
  5285. else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  5286. ob.@Name = Reader.Value;
  5287. }
  5288. else if (Reader.LocalName == "refer" && Reader.NamespaceURI == "") {
  5289. ob.@Refer = ToXmlQualifiedName (Reader.Value);
  5290. }
  5291. else if (IsXmlnsAttribute (Reader.Name)) {
  5292. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  5293. if (Reader.Prefix == "xmlns")
  5294. [email protected] (Reader.LocalName, Reader.Value);
  5295. else
  5296. [email protected] ("", Reader.Value);
  5297. }
  5298. else {
  5299. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  5300. ParseWsdlArrayType (attr);
  5301. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  5302. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  5303. anyAttributeIndex++;
  5304. }
  5305. }
  5306. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  5307. ob.@UnhandledAttributes = anyAttributeArray;
  5308. #if NET_2_0
  5309. ServiceDescription.SetExtensibleAttributes (ob);
  5310. #endif
  5311. Reader.MoveToElement();
  5312. if (Reader.IsEmptyElement) {
  5313. Reader.Skip ();
  5314. return ob;
  5315. }
  5316. Reader.ReadStartElement();
  5317. Reader.MoveToContent();
  5318. bool b165=false, b166=false, b167=false;
  5319. System.Xml.Schema.XmlSchemaObjectCollection o169;
  5320. o169 = ob.@Fields;
  5321. int n168=0;
  5322. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  5323. {
  5324. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  5325. {
  5326. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b165) {
  5327. b165 = true;
  5328. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  5329. }
  5330. else if (Reader.LocalName == "selector" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b166) {
  5331. b166 = true;
  5332. ob.@Selector = ReadObject_XmlSchemaXPath (false, true);
  5333. }
  5334. else if (Reader.LocalName == "field" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b167) {
  5335. if (((object)o169) == null)
  5336. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  5337. o169.Add (ReadObject_XmlSchemaXPath (false, true));
  5338. n168++;
  5339. }
  5340. else {
  5341. UnknownNode (ob);
  5342. }
  5343. }
  5344. else
  5345. UnknownNode(ob);
  5346. Reader.MoveToContent();
  5347. }
  5348. ReadEndElement();
  5349. return ob;
  5350. }
  5351. public System.Xml.Schema.XmlSchemaKey ReadObject_XmlSchemaKey (bool isNullable, bool checkType)
  5352. {
  5353. System.Xml.Schema.XmlSchemaKey ob = null;
  5354. if (isNullable && ReadNull()) return null;
  5355. if (checkType)
  5356. {
  5357. System.Xml.XmlQualifiedName t = GetXsiType();
  5358. if (t == null)
  5359. { }
  5360. else if (t.Name != "XmlSchemaKey" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  5361. throw CreateUnknownTypeException(t);
  5362. }
  5363. ob = new System.Xml.Schema.XmlSchemaKey ();
  5364. Reader.MoveToElement();
  5365. int anyAttributeIndex = 0;
  5366. System.Xml.XmlAttribute[] anyAttributeArray = null;
  5367. while (Reader.MoveToNextAttribute())
  5368. {
  5369. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  5370. ob.@Id = Reader.Value;
  5371. }
  5372. else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  5373. ob.@Name = Reader.Value;
  5374. }
  5375. else if (IsXmlnsAttribute (Reader.Name)) {
  5376. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  5377. if (Reader.Prefix == "xmlns")
  5378. [email protected] (Reader.LocalName, Reader.Value);
  5379. else
  5380. [email protected] ("", Reader.Value);
  5381. }
  5382. else {
  5383. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  5384. ParseWsdlArrayType (attr);
  5385. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  5386. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  5387. anyAttributeIndex++;
  5388. }
  5389. }
  5390. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  5391. ob.@UnhandledAttributes = anyAttributeArray;
  5392. #if NET_2_0
  5393. ServiceDescription.SetExtensibleAttributes (ob);
  5394. #endif
  5395. Reader.MoveToElement();
  5396. if (Reader.IsEmptyElement) {
  5397. Reader.Skip ();
  5398. return ob;
  5399. }
  5400. Reader.ReadStartElement();
  5401. Reader.MoveToContent();
  5402. bool b170=false, b171=false, b172=false;
  5403. System.Xml.Schema.XmlSchemaObjectCollection o174;
  5404. o174 = ob.@Fields;
  5405. int n173=0;
  5406. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  5407. {
  5408. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  5409. {
  5410. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b170) {
  5411. b170 = true;
  5412. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  5413. }
  5414. else if (Reader.LocalName == "selector" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b171) {
  5415. b171 = true;
  5416. ob.@Selector = ReadObject_XmlSchemaXPath (false, true);
  5417. }
  5418. else if (Reader.LocalName == "field" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b172) {
  5419. if (((object)o174) == null)
  5420. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  5421. o174.Add (ReadObject_XmlSchemaXPath (false, true));
  5422. n173++;
  5423. }
  5424. else {
  5425. UnknownNode (ob);
  5426. }
  5427. }
  5428. else
  5429. UnknownNode(ob);
  5430. Reader.MoveToContent();
  5431. }
  5432. ReadEndElement();
  5433. return ob;
  5434. }
  5435. public System.Xml.Schema.XmlSchemaUnique ReadObject_XmlSchemaUnique (bool isNullable, bool checkType)
  5436. {
  5437. System.Xml.Schema.XmlSchemaUnique ob = null;
  5438. if (isNullable && ReadNull()) return null;
  5439. if (checkType)
  5440. {
  5441. System.Xml.XmlQualifiedName t = GetXsiType();
  5442. if (t == null)
  5443. { }
  5444. else if (t.Name != "XmlSchemaUnique" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  5445. throw CreateUnknownTypeException(t);
  5446. }
  5447. ob = new System.Xml.Schema.XmlSchemaUnique ();
  5448. Reader.MoveToElement();
  5449. int anyAttributeIndex = 0;
  5450. System.Xml.XmlAttribute[] anyAttributeArray = null;
  5451. while (Reader.MoveToNextAttribute())
  5452. {
  5453. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  5454. ob.@Id = Reader.Value;
  5455. }
  5456. else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  5457. ob.@Name = Reader.Value;
  5458. }
  5459. else if (IsXmlnsAttribute (Reader.Name)) {
  5460. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  5461. if (Reader.Prefix == "xmlns")
  5462. [email protected] (Reader.LocalName, Reader.Value);
  5463. else
  5464. [email protected] ("", Reader.Value);
  5465. }
  5466. else {
  5467. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  5468. ParseWsdlArrayType (attr);
  5469. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  5470. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  5471. anyAttributeIndex++;
  5472. }
  5473. }
  5474. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  5475. ob.@UnhandledAttributes = anyAttributeArray;
  5476. #if NET_2_0
  5477. ServiceDescription.SetExtensibleAttributes (ob);
  5478. #endif
  5479. Reader.MoveToElement();
  5480. if (Reader.IsEmptyElement) {
  5481. Reader.Skip ();
  5482. return ob;
  5483. }
  5484. Reader.ReadStartElement();
  5485. Reader.MoveToContent();
  5486. bool b175=false, b176=false, b177=false;
  5487. System.Xml.Schema.XmlSchemaObjectCollection o179;
  5488. o179 = ob.@Fields;
  5489. int n178=0;
  5490. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  5491. {
  5492. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  5493. {
  5494. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b175) {
  5495. b175 = true;
  5496. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  5497. }
  5498. else if (Reader.LocalName == "selector" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b176) {
  5499. b176 = true;
  5500. ob.@Selector = ReadObject_XmlSchemaXPath (false, true);
  5501. }
  5502. else if (Reader.LocalName == "field" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b177) {
  5503. if (((object)o179) == null)
  5504. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  5505. o179.Add (ReadObject_XmlSchemaXPath (false, true));
  5506. n178++;
  5507. }
  5508. else {
  5509. UnknownNode (ob);
  5510. }
  5511. }
  5512. else
  5513. UnknownNode(ob);
  5514. Reader.MoveToContent();
  5515. }
  5516. ReadEndElement();
  5517. return ob;
  5518. }
  5519. public System.Xml.Schema.XmlSchemaElement ReadObject_XmlSchemaElement (bool isNullable, bool checkType)
  5520. {
  5521. System.Xml.Schema.XmlSchemaElement ob = null;
  5522. if (isNullable && ReadNull()) return null;
  5523. if (checkType)
  5524. {
  5525. System.Xml.XmlQualifiedName t = GetXsiType();
  5526. if (t == null)
  5527. { }
  5528. else if (t.Name != "XmlSchemaElement" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  5529. throw CreateUnknownTypeException(t);
  5530. }
  5531. ob = new System.Xml.Schema.XmlSchemaElement ();
  5532. Reader.MoveToElement();
  5533. ob.@IsAbstract = false;
  5534. ob.@Block = ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None);
  5535. ob.@Final = ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None);
  5536. ob.@Form = ((System.Xml.Schema.XmlSchemaForm) System.Xml.Schema.XmlSchemaForm.None);
  5537. ob.@Name = "";
  5538. ob.@IsNillable = false;
  5539. int anyAttributeIndex = 0;
  5540. System.Xml.XmlAttribute[] anyAttributeArray = null;
  5541. while (Reader.MoveToNextAttribute())
  5542. {
  5543. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  5544. ob.@Id = Reader.Value;
  5545. }
  5546. else if (Reader.LocalName == "minOccurs" && Reader.NamespaceURI == "") {
  5547. ob.@MinOccursString = Reader.Value;
  5548. }
  5549. else if (Reader.LocalName == "maxOccurs" && Reader.NamespaceURI == "") {
  5550. ob.@MaxOccursString = Reader.Value;
  5551. }
  5552. else if (Reader.LocalName == "abstract" && Reader.NamespaceURI == "") {
  5553. ob.@IsAbstract = XmlConvert.ToBoolean (Reader.Value);
  5554. }
  5555. else if (Reader.LocalName == "block" && Reader.NamespaceURI == "") {
  5556. ob.@Block = GetEnumValue_XmlSchemaDerivationMethod (Reader.Value);
  5557. }
  5558. else if (Reader.LocalName == "default" && Reader.NamespaceURI == "") {
  5559. ob.@DefaultValue = Reader.Value;
  5560. }
  5561. else if (Reader.LocalName == "final" && Reader.NamespaceURI == "") {
  5562. ob.@Final = GetEnumValue_XmlSchemaDerivationMethod (Reader.Value);
  5563. }
  5564. else if (Reader.LocalName == "fixed" && Reader.NamespaceURI == "") {
  5565. ob.@FixedValue = Reader.Value;
  5566. }
  5567. else if (Reader.LocalName == "form" && Reader.NamespaceURI == "") {
  5568. ob.@Form = GetEnumValue_XmlSchemaForm (Reader.Value);
  5569. }
  5570. else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  5571. ob.@Name = Reader.Value;
  5572. }
  5573. else if (Reader.LocalName == "nillable" && Reader.NamespaceURI == "") {
  5574. ob.@IsNillable = XmlConvert.ToBoolean (Reader.Value);
  5575. }
  5576. else if (Reader.LocalName == "ref" && Reader.NamespaceURI == "") {
  5577. ob.@RefName = ToXmlQualifiedName (Reader.Value);
  5578. }
  5579. else if (Reader.LocalName == "substitutionGroup" && Reader.NamespaceURI == "") {
  5580. ob.@SubstitutionGroup = ToXmlQualifiedName (Reader.Value);
  5581. }
  5582. else if (Reader.LocalName == "type" && Reader.NamespaceURI == "") {
  5583. ob.@SchemaTypeName = ToXmlQualifiedName (Reader.Value);
  5584. }
  5585. else if (IsXmlnsAttribute (Reader.Name)) {
  5586. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  5587. if (Reader.Prefix == "xmlns")
  5588. [email protected] (Reader.LocalName, Reader.Value);
  5589. else
  5590. [email protected] ("", Reader.Value);
  5591. }
  5592. else {
  5593. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  5594. ParseWsdlArrayType (attr);
  5595. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  5596. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  5597. anyAttributeIndex++;
  5598. }
  5599. }
  5600. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  5601. ob.@UnhandledAttributes = anyAttributeArray;
  5602. #if NET_2_0
  5603. ServiceDescription.SetExtensibleAttributes (ob);
  5604. #endif
  5605. Reader.MoveToElement();
  5606. if (Reader.IsEmptyElement) {
  5607. Reader.Skip ();
  5608. return ob;
  5609. }
  5610. Reader.ReadStartElement();
  5611. Reader.MoveToContent();
  5612. bool b180=false, b181=false, b182=false;
  5613. System.Xml.Schema.XmlSchemaObjectCollection o184;
  5614. o184 = ob.@Constraints;
  5615. int n183=0;
  5616. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  5617. {
  5618. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  5619. {
  5620. if (Reader.LocalName == "simpleType" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b181) {
  5621. b181 = true;
  5622. ob.@SchemaType = ReadObject_XmlSchemaSimpleType (false, true);
  5623. }
  5624. else if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b180) {
  5625. b180 = true;
  5626. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  5627. }
  5628. else if (Reader.LocalName == "key" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b182) {
  5629. if (((object)o184) == null)
  5630. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  5631. o184.Add (ReadObject_XmlSchemaKey (false, true));
  5632. n183++;
  5633. }
  5634. else if (Reader.LocalName == "complexType" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b181) {
  5635. b181 = true;
  5636. ob.@SchemaType = ReadObject_XmlSchemaComplexType (false, true);
  5637. }
  5638. else if (Reader.LocalName == "keyref" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b182) {
  5639. if (((object)o184) == null)
  5640. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  5641. o184.Add (ReadObject_XmlSchemaKeyref (false, true));
  5642. n183++;
  5643. }
  5644. else if (Reader.LocalName == "unique" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b182) {
  5645. if (((object)o184) == null)
  5646. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  5647. o184.Add (ReadObject_XmlSchemaUnique (false, true));
  5648. n183++;
  5649. }
  5650. else {
  5651. UnknownNode (ob);
  5652. }
  5653. }
  5654. else
  5655. UnknownNode(ob);
  5656. Reader.MoveToContent();
  5657. }
  5658. ReadEndElement();
  5659. return ob;
  5660. }
  5661. public System.Xml.Schema.XmlSchemaChoice ReadObject_XmlSchemaChoice (bool isNullable, bool checkType)
  5662. {
  5663. System.Xml.Schema.XmlSchemaChoice ob = null;
  5664. if (isNullable && ReadNull()) return null;
  5665. if (checkType)
  5666. {
  5667. System.Xml.XmlQualifiedName t = GetXsiType();
  5668. if (t == null)
  5669. { }
  5670. else if (t.Name != "XmlSchemaChoice" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  5671. throw CreateUnknownTypeException(t);
  5672. }
  5673. ob = new System.Xml.Schema.XmlSchemaChoice ();
  5674. Reader.MoveToElement();
  5675. int anyAttributeIndex = 0;
  5676. System.Xml.XmlAttribute[] anyAttributeArray = null;
  5677. while (Reader.MoveToNextAttribute())
  5678. {
  5679. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  5680. ob.@Id = Reader.Value;
  5681. }
  5682. else if (Reader.LocalName == "minOccurs" && Reader.NamespaceURI == "") {
  5683. ob.@MinOccursString = Reader.Value;
  5684. }
  5685. else if (Reader.LocalName == "maxOccurs" && Reader.NamespaceURI == "") {
  5686. ob.@MaxOccursString = Reader.Value;
  5687. }
  5688. else if (IsXmlnsAttribute (Reader.Name)) {
  5689. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  5690. if (Reader.Prefix == "xmlns")
  5691. [email protected] (Reader.LocalName, Reader.Value);
  5692. else
  5693. [email protected] ("", Reader.Value);
  5694. }
  5695. else {
  5696. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  5697. ParseWsdlArrayType (attr);
  5698. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  5699. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  5700. anyAttributeIndex++;
  5701. }
  5702. }
  5703. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  5704. ob.@UnhandledAttributes = anyAttributeArray;
  5705. #if NET_2_0
  5706. ServiceDescription.SetExtensibleAttributes (ob);
  5707. #endif
  5708. Reader.MoveToElement();
  5709. if (Reader.IsEmptyElement) {
  5710. Reader.Skip ();
  5711. return ob;
  5712. }
  5713. Reader.ReadStartElement();
  5714. Reader.MoveToContent();
  5715. bool b185=false, b186=false;
  5716. System.Xml.Schema.XmlSchemaObjectCollection o188;
  5717. o188 = ob.@Items;
  5718. int n187=0;
  5719. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  5720. {
  5721. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  5722. {
  5723. if (Reader.LocalName == "choice" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b186) {
  5724. if (((object)o188) == null)
  5725. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  5726. o188.Add (ReadObject_XmlSchemaChoice (false, true));
  5727. n187++;
  5728. }
  5729. else if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b185) {
  5730. b185 = true;
  5731. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  5732. }
  5733. else if (Reader.LocalName == "sequence" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b186) {
  5734. if (((object)o188) == null)
  5735. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  5736. o188.Add (ReadObject_XmlSchemaSequence (false, true));
  5737. n187++;
  5738. }
  5739. else if (Reader.LocalName == "any" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b186) {
  5740. if (((object)o188) == null)
  5741. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  5742. o188.Add (ReadObject_XmlSchemaAny (false, true));
  5743. n187++;
  5744. }
  5745. else if (Reader.LocalName == "element" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b186) {
  5746. if (((object)o188) == null)
  5747. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  5748. o188.Add (ReadObject_XmlSchemaElement (false, true));
  5749. n187++;
  5750. }
  5751. else if (Reader.LocalName == "group" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b186) {
  5752. if (((object)o188) == null)
  5753. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  5754. o188.Add (ReadObject_XmlSchemaGroupRef (false, true));
  5755. n187++;
  5756. }
  5757. else {
  5758. UnknownNode (ob);
  5759. }
  5760. }
  5761. else
  5762. UnknownNode(ob);
  5763. Reader.MoveToContent();
  5764. }
  5765. ReadEndElement();
  5766. return ob;
  5767. }
  5768. public System.Xml.Schema.XmlSchemaSequence ReadObject_XmlSchemaSequence (bool isNullable, bool checkType)
  5769. {
  5770. System.Xml.Schema.XmlSchemaSequence ob = null;
  5771. if (isNullable && ReadNull()) return null;
  5772. if (checkType)
  5773. {
  5774. System.Xml.XmlQualifiedName t = GetXsiType();
  5775. if (t == null)
  5776. { }
  5777. else if (t.Name != "XmlSchemaSequence" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  5778. throw CreateUnknownTypeException(t);
  5779. }
  5780. ob = new System.Xml.Schema.XmlSchemaSequence ();
  5781. Reader.MoveToElement();
  5782. int anyAttributeIndex = 0;
  5783. System.Xml.XmlAttribute[] anyAttributeArray = null;
  5784. while (Reader.MoveToNextAttribute())
  5785. {
  5786. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  5787. ob.@Id = Reader.Value;
  5788. }
  5789. else if (Reader.LocalName == "minOccurs" && Reader.NamespaceURI == "") {
  5790. ob.@MinOccursString = Reader.Value;
  5791. }
  5792. else if (Reader.LocalName == "maxOccurs" && Reader.NamespaceURI == "") {
  5793. ob.@MaxOccursString = Reader.Value;
  5794. }
  5795. else if (IsXmlnsAttribute (Reader.Name)) {
  5796. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  5797. if (Reader.Prefix == "xmlns")
  5798. [email protected] (Reader.LocalName, Reader.Value);
  5799. else
  5800. [email protected] ("", Reader.Value);
  5801. }
  5802. else {
  5803. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  5804. ParseWsdlArrayType (attr);
  5805. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  5806. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  5807. anyAttributeIndex++;
  5808. }
  5809. }
  5810. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  5811. ob.@UnhandledAttributes = anyAttributeArray;
  5812. #if NET_2_0
  5813. ServiceDescription.SetExtensibleAttributes (ob);
  5814. #endif
  5815. Reader.MoveToElement();
  5816. if (Reader.IsEmptyElement) {
  5817. Reader.Skip ();
  5818. return ob;
  5819. }
  5820. Reader.ReadStartElement();
  5821. Reader.MoveToContent();
  5822. bool b189=false, b190=false;
  5823. System.Xml.Schema.XmlSchemaObjectCollection o192;
  5824. o192 = ob.@Items;
  5825. int n191=0;
  5826. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  5827. {
  5828. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  5829. {
  5830. if (Reader.LocalName == "choice" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b190) {
  5831. if (((object)o192) == null)
  5832. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  5833. o192.Add (ReadObject_XmlSchemaChoice (false, true));
  5834. n191++;
  5835. }
  5836. else if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b189) {
  5837. b189 = true;
  5838. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  5839. }
  5840. else if (Reader.LocalName == "sequence" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b190) {
  5841. if (((object)o192) == null)
  5842. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  5843. o192.Add (ReadObject_XmlSchemaSequence (false, true));
  5844. n191++;
  5845. }
  5846. else if (Reader.LocalName == "any" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b190) {
  5847. if (((object)o192) == null)
  5848. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  5849. o192.Add (ReadObject_XmlSchemaAny (false, true));
  5850. n191++;
  5851. }
  5852. else if (Reader.LocalName == "element" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b190) {
  5853. if (((object)o192) == null)
  5854. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  5855. o192.Add (ReadObject_XmlSchemaElement (false, true));
  5856. n191++;
  5857. }
  5858. else if (Reader.LocalName == "group" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b190) {
  5859. if (((object)o192) == null)
  5860. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  5861. o192.Add (ReadObject_XmlSchemaGroupRef (false, true));
  5862. n191++;
  5863. }
  5864. else {
  5865. UnknownNode (ob);
  5866. }
  5867. }
  5868. else
  5869. UnknownNode(ob);
  5870. Reader.MoveToContent();
  5871. }
  5872. ReadEndElement();
  5873. return ob;
  5874. }
  5875. public System.Xml.Schema.XmlSchemaGroup ReadObject_XmlSchemaGroup (bool isNullable, bool checkType)
  5876. {
  5877. System.Xml.Schema.XmlSchemaGroup ob = null;
  5878. if (isNullable && ReadNull()) return null;
  5879. if (checkType)
  5880. {
  5881. System.Xml.XmlQualifiedName t = GetXsiType();
  5882. if (t == null)
  5883. { }
  5884. else if (t.Name != "XmlSchemaGroup" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  5885. throw CreateUnknownTypeException(t);
  5886. }
  5887. ob = new System.Xml.Schema.XmlSchemaGroup ();
  5888. Reader.MoveToElement();
  5889. int anyAttributeIndex = 0;
  5890. System.Xml.XmlAttribute[] anyAttributeArray = null;
  5891. while (Reader.MoveToNextAttribute())
  5892. {
  5893. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  5894. ob.@Id = Reader.Value;
  5895. }
  5896. else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  5897. ob.@Name = Reader.Value;
  5898. }
  5899. else if (IsXmlnsAttribute (Reader.Name)) {
  5900. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  5901. if (Reader.Prefix == "xmlns")
  5902. [email protected] (Reader.LocalName, Reader.Value);
  5903. else
  5904. [email protected] ("", Reader.Value);
  5905. }
  5906. else {
  5907. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  5908. ParseWsdlArrayType (attr);
  5909. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  5910. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  5911. anyAttributeIndex++;
  5912. }
  5913. }
  5914. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  5915. ob.@UnhandledAttributes = anyAttributeArray;
  5916. #if NET_2_0
  5917. ServiceDescription.SetExtensibleAttributes (ob);
  5918. #endif
  5919. Reader.MoveToElement();
  5920. if (Reader.IsEmptyElement) {
  5921. Reader.Skip ();
  5922. return ob;
  5923. }
  5924. Reader.ReadStartElement();
  5925. Reader.MoveToContent();
  5926. bool b193=false, b194=false;
  5927. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  5928. {
  5929. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  5930. {
  5931. if (Reader.LocalName == "choice" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b194) {
  5932. b194 = true;
  5933. ob.@Particle = ReadObject_XmlSchemaChoice (false, true);
  5934. }
  5935. else if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b193) {
  5936. b193 = true;
  5937. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  5938. }
  5939. else if (Reader.LocalName == "all" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b194) {
  5940. b194 = true;
  5941. ob.@Particle = ReadObject_XmlSchemaAll (false, true);
  5942. }
  5943. else if (Reader.LocalName == "sequence" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b194) {
  5944. b194 = true;
  5945. ob.@Particle = ReadObject_XmlSchemaSequence (false, true);
  5946. }
  5947. else {
  5948. UnknownNode (ob);
  5949. }
  5950. }
  5951. else
  5952. UnknownNode(ob);
  5953. Reader.MoveToContent();
  5954. }
  5955. ReadEndElement();
  5956. return ob;
  5957. }
  5958. public System.Xml.Schema.XmlSchemaRedefine ReadObject_XmlSchemaRedefine (bool isNullable, bool checkType)
  5959. {
  5960. System.Xml.Schema.XmlSchemaRedefine ob = null;
  5961. if (isNullable && ReadNull()) return null;
  5962. if (checkType)
  5963. {
  5964. System.Xml.XmlQualifiedName t = GetXsiType();
  5965. if (t == null)
  5966. { }
  5967. else if (t.Name != "XmlSchemaRedefine" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  5968. throw CreateUnknownTypeException(t);
  5969. }
  5970. ob = new System.Xml.Schema.XmlSchemaRedefine ();
  5971. Reader.MoveToElement();
  5972. int anyAttributeIndex = 0;
  5973. System.Xml.XmlAttribute[] anyAttributeArray = null;
  5974. while (Reader.MoveToNextAttribute())
  5975. {
  5976. if (Reader.LocalName == "schemaLocation" && Reader.NamespaceURI == "") {
  5977. ob.@SchemaLocation = Reader.Value;
  5978. }
  5979. else if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  5980. ob.@Id = Reader.Value;
  5981. }
  5982. else if (IsXmlnsAttribute (Reader.Name)) {
  5983. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  5984. if (Reader.Prefix == "xmlns")
  5985. [email protected] (Reader.LocalName, Reader.Value);
  5986. else
  5987. [email protected] ("", Reader.Value);
  5988. }
  5989. else {
  5990. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  5991. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  5992. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  5993. anyAttributeIndex++;
  5994. }
  5995. }
  5996. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  5997. ob.@UnhandledAttributes = anyAttributeArray;
  5998. #if NET_2_0
  5999. ServiceDescription.SetExtensibleAttributes (ob);
  6000. #endif
  6001. Reader.MoveToElement();
  6002. if (Reader.IsEmptyElement) {
  6003. Reader.Skip ();
  6004. return ob;
  6005. }
  6006. Reader.ReadStartElement();
  6007. Reader.MoveToContent();
  6008. bool b195=false;
  6009. System.Xml.Schema.XmlSchemaObjectCollection o197;
  6010. o197 = ob.@Items;
  6011. int n196=0;
  6012. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  6013. {
  6014. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  6015. {
  6016. if (Reader.LocalName == "group" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b195) {
  6017. if (((object)o197) == null)
  6018. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  6019. o197.Add (ReadObject_XmlSchemaGroup (false, true));
  6020. n196++;
  6021. }
  6022. else if (Reader.LocalName == "simpleType" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b195) {
  6023. if (((object)o197) == null)
  6024. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  6025. o197.Add (ReadObject_XmlSchemaSimpleType (false, true));
  6026. n196++;
  6027. }
  6028. else if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b195) {
  6029. if (((object)o197) == null)
  6030. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  6031. o197.Add (ReadObject_XmlSchemaAnnotation (false, true));
  6032. n196++;
  6033. }
  6034. else if (Reader.LocalName == "complexType" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b195) {
  6035. if (((object)o197) == null)
  6036. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  6037. o197.Add (ReadObject_XmlSchemaComplexType (false, true));
  6038. n196++;
  6039. }
  6040. else if (Reader.LocalName == "attributeGroup" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b195) {
  6041. if (((object)o197) == null)
  6042. throw CreateReadOnlyCollectionException ("System.Xml.Schema.XmlSchemaObjectCollection");
  6043. o197.Add (ReadObject_XmlSchemaAttributeGroup (false, true));
  6044. n196++;
  6045. }
  6046. else {
  6047. UnknownNode (ob);
  6048. }
  6049. }
  6050. else
  6051. UnknownNode(ob);
  6052. Reader.MoveToContent();
  6053. }
  6054. ReadEndElement();
  6055. return ob;
  6056. }
  6057. public System.Xml.Schema.XmlSchemaImport ReadObject_XmlSchemaImport (bool isNullable, bool checkType)
  6058. {
  6059. System.Xml.Schema.XmlSchemaImport ob = null;
  6060. if (isNullable && ReadNull()) return null;
  6061. if (checkType)
  6062. {
  6063. System.Xml.XmlQualifiedName t = GetXsiType();
  6064. if (t == null)
  6065. { }
  6066. else if (t.Name != "XmlSchemaImport" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  6067. throw CreateUnknownTypeException(t);
  6068. }
  6069. ob = new System.Xml.Schema.XmlSchemaImport ();
  6070. Reader.MoveToElement();
  6071. int anyAttributeIndex = 0;
  6072. System.Xml.XmlAttribute[] anyAttributeArray = null;
  6073. while (Reader.MoveToNextAttribute())
  6074. {
  6075. if (Reader.LocalName == "schemaLocation" && Reader.NamespaceURI == "") {
  6076. ob.@SchemaLocation = Reader.Value;
  6077. }
  6078. else if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  6079. ob.@Id = Reader.Value;
  6080. }
  6081. else if (Reader.LocalName == "namespace" && Reader.NamespaceURI == "") {
  6082. ob.@Namespace = Reader.Value;
  6083. }
  6084. else if (IsXmlnsAttribute (Reader.Name)) {
  6085. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  6086. if (Reader.Prefix == "xmlns")
  6087. [email protected] (Reader.LocalName, Reader.Value);
  6088. else
  6089. [email protected] ("", Reader.Value);
  6090. }
  6091. else {
  6092. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  6093. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  6094. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  6095. anyAttributeIndex++;
  6096. }
  6097. }
  6098. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  6099. ob.@UnhandledAttributes = anyAttributeArray;
  6100. #if NET_2_0
  6101. ServiceDescription.SetExtensibleAttributes (ob);
  6102. #endif
  6103. Reader.MoveToElement();
  6104. if (Reader.IsEmptyElement) {
  6105. Reader.Skip ();
  6106. return ob;
  6107. }
  6108. Reader.ReadStartElement();
  6109. Reader.MoveToContent();
  6110. bool b198=false;
  6111. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  6112. {
  6113. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  6114. {
  6115. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b198) {
  6116. b198 = true;
  6117. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  6118. }
  6119. else {
  6120. UnknownNode (ob);
  6121. }
  6122. }
  6123. else
  6124. UnknownNode(ob);
  6125. Reader.MoveToContent();
  6126. }
  6127. ReadEndElement();
  6128. return ob;
  6129. }
  6130. public System.Xml.Schema.XmlSchemaInclude ReadObject_XmlSchemaInclude (bool isNullable, bool checkType)
  6131. {
  6132. System.Xml.Schema.XmlSchemaInclude ob = null;
  6133. if (isNullable && ReadNull()) return null;
  6134. if (checkType)
  6135. {
  6136. System.Xml.XmlQualifiedName t = GetXsiType();
  6137. if (t == null)
  6138. { }
  6139. else if (t.Name != "XmlSchemaInclude" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  6140. throw CreateUnknownTypeException(t);
  6141. }
  6142. ob = new System.Xml.Schema.XmlSchemaInclude ();
  6143. Reader.MoveToElement();
  6144. int anyAttributeIndex = 0;
  6145. System.Xml.XmlAttribute[] anyAttributeArray = null;
  6146. while (Reader.MoveToNextAttribute())
  6147. {
  6148. if (Reader.LocalName == "schemaLocation" && Reader.NamespaceURI == "") {
  6149. ob.@SchemaLocation = Reader.Value;
  6150. }
  6151. else if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  6152. ob.@Id = Reader.Value;
  6153. }
  6154. else if (IsXmlnsAttribute (Reader.Name)) {
  6155. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  6156. if (Reader.Prefix == "xmlns")
  6157. [email protected] (Reader.LocalName, Reader.Value);
  6158. else
  6159. [email protected] ("", Reader.Value);
  6160. }
  6161. else {
  6162. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  6163. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  6164. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  6165. anyAttributeIndex++;
  6166. }
  6167. }
  6168. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  6169. ob.@UnhandledAttributes = anyAttributeArray;
  6170. #if NET_2_0
  6171. ServiceDescription.SetExtensibleAttributes (ob);
  6172. #endif
  6173. Reader.MoveToElement();
  6174. if (Reader.IsEmptyElement) {
  6175. Reader.Skip ();
  6176. return ob;
  6177. }
  6178. Reader.ReadStartElement();
  6179. Reader.MoveToContent();
  6180. bool b199=false;
  6181. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  6182. {
  6183. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  6184. {
  6185. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b199) {
  6186. b199 = true;
  6187. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  6188. }
  6189. else {
  6190. UnknownNode (ob);
  6191. }
  6192. }
  6193. else
  6194. UnknownNode(ob);
  6195. Reader.MoveToContent();
  6196. }
  6197. ReadEndElement();
  6198. return ob;
  6199. }
  6200. public System.Xml.Schema.XmlSchemaNotation ReadObject_XmlSchemaNotation (bool isNullable, bool checkType)
  6201. {
  6202. System.Xml.Schema.XmlSchemaNotation ob = null;
  6203. if (isNullable && ReadNull()) return null;
  6204. if (checkType)
  6205. {
  6206. System.Xml.XmlQualifiedName t = GetXsiType();
  6207. if (t == null)
  6208. { }
  6209. else if (t.Name != "XmlSchemaNotation" || t.Namespace != "http://www.w3.org/2001/XMLSchema")
  6210. throw CreateUnknownTypeException(t);
  6211. }
  6212. ob = new System.Xml.Schema.XmlSchemaNotation ();
  6213. Reader.MoveToElement();
  6214. int anyAttributeIndex = 0;
  6215. System.Xml.XmlAttribute[] anyAttributeArray = null;
  6216. while (Reader.MoveToNextAttribute())
  6217. {
  6218. if (Reader.LocalName == "id" && Reader.NamespaceURI == "") {
  6219. ob.@Id = Reader.Value;
  6220. }
  6221. else if (Reader.LocalName == "name" && Reader.NamespaceURI == "") {
  6222. ob.@Name = Reader.Value;
  6223. }
  6224. else if (Reader.LocalName == "public" && Reader.NamespaceURI == "") {
  6225. ob.@Public = Reader.Value;
  6226. }
  6227. else if (Reader.LocalName == "system" && Reader.NamespaceURI == "") {
  6228. ob.@System = Reader.Value;
  6229. }
  6230. else if (IsXmlnsAttribute (Reader.Name)) {
  6231. if (ob.@Namespaces == null) ob.@Namespaces = new XmlSerializerNamespaces ();
  6232. if (Reader.Prefix == "xmlns")
  6233. [email protected] (Reader.LocalName, Reader.Value);
  6234. else
  6235. [email protected] ("", Reader.Value);
  6236. }
  6237. else {
  6238. System.Xml.XmlAttribute attr = (System.Xml.XmlAttribute) Document.ReadNode(Reader);
  6239. ParseWsdlArrayType (attr);
  6240. anyAttributeArray = (System.Xml.XmlAttribute[]) EnsureArrayIndex (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute));
  6241. anyAttributeArray[anyAttributeIndex] = ((System.Xml.XmlAttribute) attr);
  6242. anyAttributeIndex++;
  6243. }
  6244. }
  6245. anyAttributeArray = (System.Xml.XmlAttribute[]) ShrinkArray (anyAttributeArray, anyAttributeIndex, typeof(System.Xml.XmlAttribute), true);
  6246. ob.@UnhandledAttributes = anyAttributeArray;
  6247. #if NET_2_0
  6248. ServiceDescription.SetExtensibleAttributes (ob);
  6249. #endif
  6250. Reader.MoveToElement();
  6251. if (Reader.IsEmptyElement) {
  6252. Reader.Skip ();
  6253. return ob;
  6254. }
  6255. Reader.ReadStartElement();
  6256. Reader.MoveToContent();
  6257. bool b200=false;
  6258. while (Reader.NodeType != System.Xml.XmlNodeType.EndElement)
  6259. {
  6260. if (Reader.NodeType == System.Xml.XmlNodeType.Element)
  6261. {
  6262. if (Reader.LocalName == "annotation" && Reader.NamespaceURI == "http://www.w3.org/2001/XMLSchema" && !b200) {
  6263. b200 = true;
  6264. ob.@Annotation = ReadObject_XmlSchemaAnnotation (false, true);
  6265. }
  6266. else {
  6267. UnknownNode (ob);
  6268. }
  6269. }
  6270. else
  6271. UnknownNode(ob);
  6272. Reader.MoveToContent();
  6273. }
  6274. ReadEndElement();
  6275. return ob;
  6276. }
  6277. public System.Web.Services.Description.OperationMessage ReadObject_OperationMessage (bool isNullable, bool checkType)
  6278. {
  6279. System.Web.Services.Description.OperationMessage ob = null;
  6280. if (isNullable && ReadNull()) return null;
  6281. if (checkType)
  6282. {
  6283. System.Xml.XmlQualifiedName t = GetXsiType();
  6284. if (t == null)
  6285. { }
  6286. else if (t.Name == "OperationFault" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  6287. return ReadObject_OperationFault (isNullable, checkType);
  6288. else if (t.Name == "OperationInput" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  6289. return ReadObject_OperationInput (isNullable, checkType);
  6290. else if (t.Name == "OperationOutput" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  6291. return ReadObject_OperationOutput (isNullable, checkType);
  6292. else if (t.Name != "OperationMessage" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  6293. throw CreateUnknownTypeException(t);
  6294. }
  6295. return ob;
  6296. }
  6297. public System.Web.Services.Description.ServiceDescriptionFormatExtensionCollection ReadObject_ArrayOfAnyType (bool isNullable, bool checkType)
  6298. {
  6299. throw CreateReadOnlyCollectionException ("System.Web.Services.Description.ServiceDescriptionFormatExtensionCollection");
  6300. }
  6301. public System.Web.Services.Description.MessageBinding ReadObject_MessageBinding (bool isNullable, bool checkType)
  6302. {
  6303. System.Web.Services.Description.MessageBinding ob = null;
  6304. if (isNullable && ReadNull()) return null;
  6305. if (checkType)
  6306. {
  6307. System.Xml.XmlQualifiedName t = GetXsiType();
  6308. if (t == null)
  6309. { }
  6310. else if (t.Name == "FaultBinding" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  6311. return ReadObject_FaultBinding (isNullable, checkType);
  6312. else if (t.Name == "InputBinding" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  6313. return ReadObject_InputBinding (isNullable, checkType);
  6314. else if (t.Name == "OutputBinding" && t.Namespace == "http://schemas.xmlsoap.org/wsdl/")
  6315. return ReadObject_OutputBinding (isNullable, checkType);
  6316. else if (t.Name != "MessageBinding" || t.Namespace != "http://schemas.xmlsoap.org/wsdl/")
  6317. throw CreateUnknownTypeException(t);
  6318. }
  6319. return ob;
  6320. }
  6321. protected override void InitCallbacks ()
  6322. {
  6323. }
  6324. protected override void InitIDs ()
  6325. {
  6326. }
  6327. }
  6328. internal class ServiceDescriptionWriterBase : XmlSerializationWriter
  6329. {
  6330. const string xmlNamespace = "http://www.w3.org/2000/xmlns/";
  6331. public void WriteTree (System.Web.Services.Description.ServiceDescription ob)
  6332. {
  6333. WriteStartDocument ();
  6334. TopLevelElement ();
  6335. WriteObject_ServiceDescription (ob, "definitions", "http://schemas.xmlsoap.org/wsdl/", true, false, true);
  6336. }
  6337. void WriteObject_ServiceDescription (System.Web.Services.Description.ServiceDescription ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  6338. {
  6339. if (((object)ob) == null)
  6340. {
  6341. if (isNullable)
  6342. WriteNullTagLiteral(element, namesp);
  6343. return;
  6344. }
  6345. System.Type type = ob.GetType ();
  6346. if (type == typeof(System.Web.Services.Description.ServiceDescription))
  6347. { }
  6348. else {
  6349. throw CreateUnknownTypeException (ob);
  6350. }
  6351. if (writeWrappingElem) {
  6352. WriteStartElement (element, namesp, ob);
  6353. }
  6354. if (needType) WriteXsiType("ServiceDescription", "http://schemas.xmlsoap.org/wsdl/");
  6355. WriteAttribute ("name", "", ob.@Name);
  6356. WriteAttribute ("targetNamespace", "", ob.@TargetNamespace);
  6357. ServiceDescription.WriteExtensions (Writer, ob);
  6358. if (ob.@DocumentationElement != null) {
  6359. XmlNode o201 = ob.@DocumentationElement;
  6360. if (o201 is XmlElement) {
  6361. if ((o201.Name == "documentation" && o201.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
  6362. }
  6363. else o201.WriteTo (Writer);
  6364. WriteElementLiteral (o201, "", "", false, true);
  6365. }
  6366. else
  6367. throw CreateUnknownAnyElementException (o201.Name, o201.NamespaceURI);
  6368. }
  6369. if (ob.@Imports != null) {
  6370. for (int n202 = 0; n202 < [email protected]; n202++) {
  6371. WriteObject_Import (ob.@Imports[n202], "import", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  6372. }
  6373. }
  6374. WriteObject_Types (ob.@Types, "types", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  6375. if (ob.@Messages != null) {
  6376. for (int n203 = 0; n203 < [email protected]; n203++) {
  6377. WriteObject_Message (ob.@Messages[n203], "message", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  6378. }
  6379. }
  6380. if (ob.@PortTypes != null) {
  6381. for (int n204 = 0; n204 < [email protected]; n204++) {
  6382. WriteObject_PortType (ob.@PortTypes[n204], "portType", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  6383. }
  6384. }
  6385. if (ob.@Bindings != null) {
  6386. for (int n205 = 0; n205 < [email protected]; n205++) {
  6387. WriteObject_Binding (ob.@Bindings[n205], "binding", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  6388. }
  6389. }
  6390. if (ob.@Services != null) {
  6391. for (int n206 = 0; n206 < [email protected]; n206++) {
  6392. WriteObject_Service (ob.@Services[n206], "service", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  6393. }
  6394. }
  6395. if (writeWrappingElem) WriteEndElement (ob);
  6396. }
  6397. void WriteObject_Import (System.Web.Services.Description.Import ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  6398. {
  6399. if (((object)ob) == null)
  6400. {
  6401. if (isNullable)
  6402. WriteNullTagLiteral(element, namesp);
  6403. return;
  6404. }
  6405. System.Type type = ob.GetType ();
  6406. if (type == typeof(System.Web.Services.Description.Import))
  6407. { }
  6408. else {
  6409. throw CreateUnknownTypeException (ob);
  6410. }
  6411. if (writeWrappingElem) {
  6412. WriteStartElement (element, namesp, ob);
  6413. }
  6414. if (needType) WriteXsiType("Import", "http://schemas.xmlsoap.org/wsdl/");
  6415. WriteAttribute ("location", "", ob.@Location);
  6416. WriteAttribute ("namespace", "", ob.@Namespace);
  6417. if (ob.@DocumentationElement != null) {
  6418. XmlNode o207 = ob.@DocumentationElement;
  6419. if (o207 is XmlElement) {
  6420. if ((o207.Name == "documentation" && o207.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
  6421. }
  6422. else o207.WriteTo (Writer);
  6423. WriteElementLiteral (o207, "", "", false, true);
  6424. }
  6425. else
  6426. throw CreateUnknownAnyElementException (o207.Name, o207.NamespaceURI);
  6427. }
  6428. if (writeWrappingElem) WriteEndElement (ob);
  6429. }
  6430. void WriteObject_Types (System.Web.Services.Description.Types ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  6431. {
  6432. if (((object)ob) == null)
  6433. {
  6434. if (isNullable)
  6435. WriteNullTagLiteral(element, namesp);
  6436. return;
  6437. }
  6438. System.Type type = ob.GetType ();
  6439. if (type == typeof(System.Web.Services.Description.Types))
  6440. { }
  6441. else {
  6442. throw CreateUnknownTypeException (ob);
  6443. }
  6444. if (writeWrappingElem) {
  6445. WriteStartElement (element, namesp, ob);
  6446. }
  6447. if (needType) WriteXsiType("Types", "http://schemas.xmlsoap.org/wsdl/");
  6448. ServiceDescription.WriteExtensions (Writer, ob);
  6449. if (ob.@DocumentationElement != null) {
  6450. XmlNode o208 = ob.@DocumentationElement;
  6451. if (o208 is XmlElement) {
  6452. if ((o208.Name == "documentation" && o208.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
  6453. }
  6454. else o208.WriteTo (Writer);
  6455. WriteElementLiteral (o208, "", "", false, true);
  6456. }
  6457. else
  6458. throw CreateUnknownAnyElementException (o208.Name, o208.NamespaceURI);
  6459. }
  6460. if (ob.@Schemas != null) {
  6461. for (int n209 = 0; n209 < [email protected]; n209++) {
  6462. WriteObject_XmlSchema (ob.@Schemas[n209], "schema", "http://www.w3.org/2001/XMLSchema", false, false, true);
  6463. }
  6464. }
  6465. if (writeWrappingElem) WriteEndElement (ob);
  6466. }
  6467. void WriteObject_Message (System.Web.Services.Description.Message ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  6468. {
  6469. if (((object)ob) == null)
  6470. {
  6471. if (isNullable)
  6472. WriteNullTagLiteral(element, namesp);
  6473. return;
  6474. }
  6475. System.Type type = ob.GetType ();
  6476. if (type == typeof(System.Web.Services.Description.Message))
  6477. { }
  6478. else {
  6479. throw CreateUnknownTypeException (ob);
  6480. }
  6481. if (writeWrappingElem) {
  6482. WriteStartElement (element, namesp, ob);
  6483. }
  6484. if (needType) WriteXsiType("Message", "http://schemas.xmlsoap.org/wsdl/");
  6485. WriteAttribute ("name", "", ob.@Name);
  6486. if (ob.@DocumentationElement != null) {
  6487. XmlNode o210 = ob.@DocumentationElement;
  6488. if (o210 is XmlElement) {
  6489. if ((o210.Name == "documentation" && o210.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
  6490. }
  6491. else o210.WriteTo (Writer);
  6492. WriteElementLiteral (o210, "", "", false, true);
  6493. }
  6494. else
  6495. throw CreateUnknownAnyElementException (o210.Name, o210.NamespaceURI);
  6496. }
  6497. if (ob.@Parts != null) {
  6498. for (int n211 = 0; n211 < [email protected]; n211++) {
  6499. WriteObject_MessagePart (ob.@Parts[n211], "part", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  6500. }
  6501. }
  6502. if (writeWrappingElem) WriteEndElement (ob);
  6503. }
  6504. void WriteObject_PortType (System.Web.Services.Description.PortType ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  6505. {
  6506. if (((object)ob) == null)
  6507. {
  6508. if (isNullable)
  6509. WriteNullTagLiteral(element, namesp);
  6510. return;
  6511. }
  6512. System.Type type = ob.GetType ();
  6513. if (type == typeof(System.Web.Services.Description.PortType))
  6514. { }
  6515. else {
  6516. throw CreateUnknownTypeException (ob);
  6517. }
  6518. if (writeWrappingElem) {
  6519. WriteStartElement (element, namesp, ob);
  6520. }
  6521. if (needType) WriteXsiType("PortType", "http://schemas.xmlsoap.org/wsdl/");
  6522. WriteAttribute ("name", "", ob.@Name);
  6523. if (ob.@DocumentationElement != null) {
  6524. XmlNode o212 = ob.@DocumentationElement;
  6525. if (o212 is XmlElement) {
  6526. if ((o212.Name == "documentation" && o212.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
  6527. }
  6528. else o212.WriteTo (Writer);
  6529. WriteElementLiteral (o212, "", "", false, true);
  6530. }
  6531. else
  6532. throw CreateUnknownAnyElementException (o212.Name, o212.NamespaceURI);
  6533. }
  6534. if (ob.@Operations != null) {
  6535. for (int n213 = 0; n213 < [email protected]; n213++) {
  6536. WriteObject_Operation (ob.@Operations[n213], "operation", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  6537. }
  6538. }
  6539. if (writeWrappingElem) WriteEndElement (ob);
  6540. }
  6541. void WriteObject_Binding (System.Web.Services.Description.Binding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  6542. {
  6543. if (((object)ob) == null)
  6544. {
  6545. if (isNullable)
  6546. WriteNullTagLiteral(element, namesp);
  6547. return;
  6548. }
  6549. System.Type type = ob.GetType ();
  6550. if (type == typeof(System.Web.Services.Description.Binding))
  6551. { }
  6552. else {
  6553. throw CreateUnknownTypeException (ob);
  6554. }
  6555. if (writeWrappingElem) {
  6556. WriteStartElement (element, namesp, ob);
  6557. }
  6558. if (needType) WriteXsiType("Binding", "http://schemas.xmlsoap.org/wsdl/");
  6559. WriteAttribute ("name", "", ob.@Name);
  6560. WriteAttribute ("type", "", FromXmlQualifiedName (ob.@Type));
  6561. ServiceDescription.WriteExtensions (Writer, ob);
  6562. if (ob.@DocumentationElement != null) {
  6563. XmlNode o214 = ob.@DocumentationElement;
  6564. if (o214 is XmlElement) {
  6565. if ((o214.Name == "documentation" && o214.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
  6566. }
  6567. else o214.WriteTo (Writer);
  6568. WriteElementLiteral (o214, "", "", false, true);
  6569. }
  6570. else
  6571. throw CreateUnknownAnyElementException (o214.Name, o214.NamespaceURI);
  6572. }
  6573. if (ob.@Operations != null) {
  6574. for (int n215 = 0; n215 < [email protected]; n215++) {
  6575. WriteObject_OperationBinding (ob.@Operations[n215], "operation", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  6576. }
  6577. }
  6578. if (writeWrappingElem) WriteEndElement (ob);
  6579. }
  6580. void WriteObject_Service (System.Web.Services.Description.Service ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  6581. {
  6582. if (((object)ob) == null)
  6583. {
  6584. if (isNullable)
  6585. WriteNullTagLiteral(element, namesp);
  6586. return;
  6587. }
  6588. System.Type type = ob.GetType ();
  6589. if (type == typeof(System.Web.Services.Description.Service))
  6590. { }
  6591. else {
  6592. throw CreateUnknownTypeException (ob);
  6593. }
  6594. if (writeWrappingElem) {
  6595. WriteStartElement (element, namesp, ob);
  6596. }
  6597. if (needType) WriteXsiType("Service", "http://schemas.xmlsoap.org/wsdl/");
  6598. WriteAttribute ("name", "", ob.@Name);
  6599. if (ob.@DocumentationElement != null) {
  6600. XmlNode o216 = ob.@DocumentationElement;
  6601. if (o216 is XmlElement) {
  6602. if ((o216.Name == "documentation" && o216.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
  6603. }
  6604. else o216.WriteTo (Writer);
  6605. WriteElementLiteral (o216, "", "", false, true);
  6606. }
  6607. else
  6608. throw CreateUnknownAnyElementException (o216.Name, o216.NamespaceURI);
  6609. }
  6610. if (ob.@Ports != null) {
  6611. for (int n217 = 0; n217 < [email protected]; n217++) {
  6612. WriteObject_Port (ob.@Ports[n217], "port", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  6613. }
  6614. }
  6615. if (writeWrappingElem) WriteEndElement (ob);
  6616. }
  6617. void WriteObject_XmlSchema (System.Xml.Schema.XmlSchema ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  6618. {
  6619. ob.Write (Writer);
  6620. }
  6621. void WriteObject_MessagePart (System.Web.Services.Description.MessagePart ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  6622. {
  6623. if (((object)ob) == null)
  6624. {
  6625. if (isNullable)
  6626. WriteNullTagLiteral(element, namesp);
  6627. return;
  6628. }
  6629. System.Type type = ob.GetType ();
  6630. if (type == typeof(System.Web.Services.Description.MessagePart))
  6631. { }
  6632. else {
  6633. throw CreateUnknownTypeException (ob);
  6634. }
  6635. if (writeWrappingElem) {
  6636. WriteStartElement (element, namesp, ob);
  6637. }
  6638. if (needType) WriteXsiType("MessagePart", "http://schemas.xmlsoap.org/wsdl/");
  6639. WriteAttribute ("element", "", FromXmlQualifiedName (ob.@Element));
  6640. WriteAttribute ("name", "", ob.@Name);
  6641. WriteAttribute ("type", "", FromXmlQualifiedName (ob.@Type));
  6642. if (ob.@DocumentationElement != null) {
  6643. XmlNode o218 = ob.@DocumentationElement;
  6644. if (o218 is XmlElement) {
  6645. if ((o218.Name == "documentation" && o218.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
  6646. }
  6647. else o218.WriteTo (Writer);
  6648. WriteElementLiteral (o218, "", "", false, true);
  6649. }
  6650. else
  6651. throw CreateUnknownAnyElementException (o218.Name, o218.NamespaceURI);
  6652. }
  6653. if (writeWrappingElem) WriteEndElement (ob);
  6654. }
  6655. void WriteObject_Operation (System.Web.Services.Description.Operation ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  6656. {
  6657. if (((object)ob) == null)
  6658. {
  6659. if (isNullable)
  6660. WriteNullTagLiteral(element, namesp);
  6661. return;
  6662. }
  6663. System.Type type = ob.GetType ();
  6664. if (type == typeof(System.Web.Services.Description.Operation))
  6665. { }
  6666. else {
  6667. throw CreateUnknownTypeException (ob);
  6668. }
  6669. if (writeWrappingElem) {
  6670. WriteStartElement (element, namesp, ob);
  6671. }
  6672. if (needType) WriteXsiType("Operation", "http://schemas.xmlsoap.org/wsdl/");
  6673. WriteAttribute ("name", "", ob.@Name);
  6674. if (ob.@ParameterOrderString != "") {
  6675. WriteAttribute ("parameterOrder", "", ob.@ParameterOrderString);
  6676. }
  6677. if (ob.@DocumentationElement != null) {
  6678. XmlNode o219 = ob.@DocumentationElement;
  6679. if (o219 is XmlElement) {
  6680. if ((o219.Name == "documentation" && o219.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
  6681. }
  6682. else o219.WriteTo (Writer);
  6683. WriteElementLiteral (o219, "", "", false, true);
  6684. }
  6685. else
  6686. throw CreateUnknownAnyElementException (o219.Name, o219.NamespaceURI);
  6687. }
  6688. if (ob.@Faults != null) {
  6689. for (int n220 = 0; n220 < [email protected]; n220++) {
  6690. WriteObject_OperationFault (ob.@Faults[n220], "fault", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  6691. }
  6692. }
  6693. if (ob.@Messages != null) {
  6694. for (int n221 = 0; n221 < [email protected]; n221++) {
  6695. if (((object)ob.@Messages[n221]) == null) { }
  6696. else if (ob.@Messages[n221].GetType() == typeof(System.Web.Services.Description.OperationInput)) {
  6697. WriteObject_OperationInput (((System.Web.Services.Description.OperationInput) ob.@Messages[n221]), "input", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  6698. }
  6699. else if (ob.@Messages[n221].GetType() == typeof(System.Web.Services.Description.OperationOutput)) {
  6700. WriteObject_OperationOutput (((System.Web.Services.Description.OperationOutput) ob.@Messages[n221]), "output", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  6701. }
  6702. else throw CreateUnknownTypeException (ob.@Messages[n221]);
  6703. }
  6704. }
  6705. if (writeWrappingElem) WriteEndElement (ob);
  6706. }
  6707. void WriteObject_OperationBinding (System.Web.Services.Description.OperationBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  6708. {
  6709. if (((object)ob) == null)
  6710. {
  6711. if (isNullable)
  6712. WriteNullTagLiteral(element, namesp);
  6713. return;
  6714. }
  6715. System.Type type = ob.GetType ();
  6716. if (type == typeof(System.Web.Services.Description.OperationBinding))
  6717. { }
  6718. else {
  6719. throw CreateUnknownTypeException (ob);
  6720. }
  6721. if (writeWrappingElem) {
  6722. WriteStartElement (element, namesp, ob);
  6723. }
  6724. if (needType) WriteXsiType("OperationBinding", "http://schemas.xmlsoap.org/wsdl/");
  6725. WriteAttribute ("name", "", ob.@Name);
  6726. ServiceDescription.WriteExtensions (Writer, ob);
  6727. if (ob.@DocumentationElement != null) {
  6728. XmlNode o222 = ob.@DocumentationElement;
  6729. if (o222 is XmlElement) {
  6730. if ((o222.Name == "documentation" && o222.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
  6731. }
  6732. else o222.WriteTo (Writer);
  6733. WriteElementLiteral (o222, "", "", false, true);
  6734. }
  6735. else
  6736. throw CreateUnknownAnyElementException (o222.Name, o222.NamespaceURI);
  6737. }
  6738. if (ob.@Faults != null) {
  6739. for (int n223 = 0; n223 < [email protected]; n223++) {
  6740. WriteObject_FaultBinding (ob.@Faults[n223], "fault", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  6741. }
  6742. }
  6743. WriteObject_InputBinding (ob.@Input, "input", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  6744. WriteObject_OutputBinding (ob.@Output, "output", "http://schemas.xmlsoap.org/wsdl/", false, false, true);
  6745. if (writeWrappingElem) WriteEndElement (ob);
  6746. }
  6747. void WriteObject_Port (System.Web.Services.Description.Port ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  6748. {
  6749. if (((object)ob) == null)
  6750. {
  6751. if (isNullable)
  6752. WriteNullTagLiteral(element, namesp);
  6753. return;
  6754. }
  6755. System.Type type = ob.GetType ();
  6756. if (type == typeof(System.Web.Services.Description.Port))
  6757. { }
  6758. else {
  6759. throw CreateUnknownTypeException (ob);
  6760. }
  6761. if (writeWrappingElem) {
  6762. WriteStartElement (element, namesp, ob);
  6763. }
  6764. if (needType) WriteXsiType("Port", "http://schemas.xmlsoap.org/wsdl/");
  6765. WriteAttribute ("binding", "", FromXmlQualifiedName (ob.@Binding));
  6766. WriteAttribute ("name", "", ob.@Name);
  6767. ServiceDescription.WriteExtensions (Writer, ob);
  6768. if (ob.@DocumentationElement != null) {
  6769. XmlNode o224 = ob.@DocumentationElement;
  6770. if (o224 is XmlElement) {
  6771. if ((o224.Name == "documentation" && o224.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
  6772. }
  6773. else o224.WriteTo (Writer);
  6774. WriteElementLiteral (o224, "", "", false, true);
  6775. }
  6776. else
  6777. throw CreateUnknownAnyElementException (o224.Name, o224.NamespaceURI);
  6778. }
  6779. if (writeWrappingElem) WriteEndElement (ob);
  6780. }
  6781. void WriteObject_OperationFault (System.Web.Services.Description.OperationFault ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  6782. {
  6783. if (((object)ob) == null)
  6784. {
  6785. if (isNullable)
  6786. WriteNullTagLiteral(element, namesp);
  6787. return;
  6788. }
  6789. System.Type type = ob.GetType ();
  6790. if (type == typeof(System.Web.Services.Description.OperationFault))
  6791. { }
  6792. else {
  6793. throw CreateUnknownTypeException (ob);
  6794. }
  6795. if (writeWrappingElem) {
  6796. WriteStartElement (element, namesp, ob);
  6797. }
  6798. if (needType) WriteXsiType("OperationFault", "http://schemas.xmlsoap.org/wsdl/");
  6799. WriteAttribute ("message", "", FromXmlQualifiedName (ob.@Message));
  6800. WriteAttribute ("name", "", ob.@Name);
  6801. if (ob.@DocumentationElement != null) {
  6802. XmlNode o225 = ob.@DocumentationElement;
  6803. if (o225 is XmlElement) {
  6804. if ((o225.Name == "documentation" && o225.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
  6805. }
  6806. else o225.WriteTo (Writer);
  6807. WriteElementLiteral (o225, "", "", false, true);
  6808. }
  6809. else
  6810. throw CreateUnknownAnyElementException (o225.Name, o225.NamespaceURI);
  6811. }
  6812. if (writeWrappingElem) WriteEndElement (ob);
  6813. }
  6814. void WriteObject_OperationInput (System.Web.Services.Description.OperationInput ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  6815. {
  6816. if (((object)ob) == null)
  6817. {
  6818. if (isNullable)
  6819. WriteNullTagLiteral(element, namesp);
  6820. return;
  6821. }
  6822. System.Type type = ob.GetType ();
  6823. if (type == typeof(System.Web.Services.Description.OperationInput))
  6824. { }
  6825. else {
  6826. throw CreateUnknownTypeException (ob);
  6827. }
  6828. if (writeWrappingElem) {
  6829. WriteStartElement (element, namesp, ob);
  6830. }
  6831. if (needType) WriteXsiType("OperationInput", "http://schemas.xmlsoap.org/wsdl/");
  6832. WriteAttribute ("message", "", FromXmlQualifiedName (ob.@Message));
  6833. WriteAttribute ("name", "", ob.@Name);
  6834. if (ob.@DocumentationElement != null) {
  6835. XmlNode o226 = ob.@DocumentationElement;
  6836. if (o226 is XmlElement) {
  6837. if ((o226.Name == "documentation" && o226.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
  6838. }
  6839. else o226.WriteTo (Writer);
  6840. WriteElementLiteral (o226, "", "", false, true);
  6841. }
  6842. else
  6843. throw CreateUnknownAnyElementException (o226.Name, o226.NamespaceURI);
  6844. }
  6845. if (writeWrappingElem) WriteEndElement (ob);
  6846. }
  6847. void WriteObject_OperationOutput (System.Web.Services.Description.OperationOutput ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  6848. {
  6849. if (((object)ob) == null)
  6850. {
  6851. if (isNullable)
  6852. WriteNullTagLiteral(element, namesp);
  6853. return;
  6854. }
  6855. System.Type type = ob.GetType ();
  6856. if (type == typeof(System.Web.Services.Description.OperationOutput))
  6857. { }
  6858. else {
  6859. throw CreateUnknownTypeException (ob);
  6860. }
  6861. if (writeWrappingElem) {
  6862. WriteStartElement (element, namesp, ob);
  6863. }
  6864. if (needType) WriteXsiType("OperationOutput", "http://schemas.xmlsoap.org/wsdl/");
  6865. WriteAttribute ("message", "", FromXmlQualifiedName (ob.@Message));
  6866. WriteAttribute ("name", "", ob.@Name);
  6867. if (ob.@DocumentationElement != null) {
  6868. XmlNode o227 = ob.@DocumentationElement;
  6869. if (o227 is XmlElement) {
  6870. if ((o227.Name == "documentation" && o227.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
  6871. }
  6872. else o227.WriteTo (Writer);
  6873. WriteElementLiteral (o227, "", "", false, true);
  6874. }
  6875. else
  6876. throw CreateUnknownAnyElementException (o227.Name, o227.NamespaceURI);
  6877. }
  6878. if (writeWrappingElem) WriteEndElement (ob);
  6879. }
  6880. void WriteObject_FaultBinding (System.Web.Services.Description.FaultBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  6881. {
  6882. if (((object)ob) == null)
  6883. {
  6884. if (isNullable)
  6885. WriteNullTagLiteral(element, namesp);
  6886. return;
  6887. }
  6888. System.Type type = ob.GetType ();
  6889. if (type == typeof(System.Web.Services.Description.FaultBinding))
  6890. { }
  6891. else {
  6892. throw CreateUnknownTypeException (ob);
  6893. }
  6894. if (writeWrappingElem) {
  6895. WriteStartElement (element, namesp, ob);
  6896. }
  6897. if (needType) WriteXsiType("FaultBinding", "http://schemas.xmlsoap.org/wsdl/");
  6898. WriteAttribute ("name", "", ob.@Name);
  6899. ServiceDescription.WriteExtensions (Writer, ob);
  6900. if (ob.@DocumentationElement != null) {
  6901. XmlNode o228 = ob.@DocumentationElement;
  6902. if (o228 is XmlElement) {
  6903. if ((o228.Name == "documentation" && o228.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
  6904. }
  6905. else o228.WriteTo (Writer);
  6906. WriteElementLiteral (o228, "", "", false, true);
  6907. }
  6908. else
  6909. throw CreateUnknownAnyElementException (o228.Name, o228.NamespaceURI);
  6910. }
  6911. if (ob.@Extensions != null) {
  6912. WriteStartElement ("Extensions", "http://schemas.xmlsoap.org/wsdl/", ob.@Extensions);
  6913. for (int n229 = 0; n229 < [email protected]; n229++) {
  6914. WriteObject_anyType (ob.@Extensions[n229], "anyType", "http://schemas.xmlsoap.org/wsdl/", true, false, true);
  6915. }
  6916. WriteEndElement (ob.@Extensions);
  6917. }
  6918. if (writeWrappingElem) WriteEndElement (ob);
  6919. }
  6920. void WriteObject_InputBinding (System.Web.Services.Description.InputBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  6921. {
  6922. if (((object)ob) == null)
  6923. {
  6924. if (isNullable)
  6925. WriteNullTagLiteral(element, namesp);
  6926. return;
  6927. }
  6928. System.Type type = ob.GetType ();
  6929. if (type == typeof(System.Web.Services.Description.InputBinding))
  6930. { }
  6931. else {
  6932. throw CreateUnknownTypeException (ob);
  6933. }
  6934. if (writeWrappingElem) {
  6935. WriteStartElement (element, namesp, ob);
  6936. }
  6937. if (needType) WriteXsiType("InputBinding", "http://schemas.xmlsoap.org/wsdl/");
  6938. WriteAttribute ("name", "", ob.@Name);
  6939. ServiceDescription.WriteExtensions (Writer, ob);
  6940. if (ob.@DocumentationElement != null) {
  6941. XmlNode o230 = ob.@DocumentationElement;
  6942. if (o230 is XmlElement) {
  6943. if ((o230.Name == "documentation" && o230.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
  6944. }
  6945. else o230.WriteTo (Writer);
  6946. WriteElementLiteral (o230, "", "", false, true);
  6947. }
  6948. else
  6949. throw CreateUnknownAnyElementException (o230.Name, o230.NamespaceURI);
  6950. }
  6951. if (ob.@Extensions != null) {
  6952. WriteStartElement ("Extensions", "http://schemas.xmlsoap.org/wsdl/", ob.@Extensions);
  6953. for (int n231 = 0; n231 < [email protected]; n231++) {
  6954. WriteObject_anyType (ob.@Extensions[n231], "anyType", "http://schemas.xmlsoap.org/wsdl/", true, false, true);
  6955. }
  6956. WriteEndElement (ob.@Extensions);
  6957. }
  6958. if (writeWrappingElem) WriteEndElement (ob);
  6959. }
  6960. void WriteObject_OutputBinding (System.Web.Services.Description.OutputBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  6961. {
  6962. if (((object)ob) == null)
  6963. {
  6964. if (isNullable)
  6965. WriteNullTagLiteral(element, namesp);
  6966. return;
  6967. }
  6968. System.Type type = ob.GetType ();
  6969. if (type == typeof(System.Web.Services.Description.OutputBinding))
  6970. { }
  6971. else {
  6972. throw CreateUnknownTypeException (ob);
  6973. }
  6974. if (writeWrappingElem) {
  6975. WriteStartElement (element, namesp, ob);
  6976. }
  6977. if (needType) WriteXsiType("OutputBinding", "http://schemas.xmlsoap.org/wsdl/");
  6978. WriteAttribute ("name", "", ob.@Name);
  6979. ServiceDescription.WriteExtensions (Writer, ob);
  6980. if (ob.@DocumentationElement != null) {
  6981. XmlNode o232 = ob.@DocumentationElement;
  6982. if (o232 is XmlElement) {
  6983. if ((o232.Name == "documentation" && o232.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
  6984. }
  6985. else o232.WriteTo (Writer);
  6986. WriteElementLiteral (o232, "", "", false, true);
  6987. }
  6988. else
  6989. throw CreateUnknownAnyElementException (o232.Name, o232.NamespaceURI);
  6990. }
  6991. if (ob.@Extensions != null) {
  6992. WriteStartElement ("Extensions", "http://schemas.xmlsoap.org/wsdl/", ob.@Extensions);
  6993. for (int n233 = 0; n233 < [email protected]; n233++) {
  6994. WriteObject_anyType (ob.@Extensions[n233], "anyType", "http://schemas.xmlsoap.org/wsdl/", true, false, true);
  6995. }
  6996. WriteEndElement (ob.@Extensions);
  6997. }
  6998. if (writeWrappingElem) WriteEndElement (ob);
  6999. }
  7000. void WriteObject_anyType (System.Object ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  7001. {
  7002. if (((object)ob) == null)
  7003. {
  7004. if (isNullable)
  7005. WriteNullTagLiteral(element, namesp);
  7006. return;
  7007. }
  7008. System.Type type = ob.GetType ();
  7009. if (type == typeof(System.Object))
  7010. { }
  7011. else if (type == typeof(System.Web.Services.Description.DocumentableItem)) {
  7012. WriteObject_DocumentableItem((System.Web.Services.Description.DocumentableItem)ob, element, namesp, isNullable, true, writeWrappingElem);
  7013. return;
  7014. }
  7015. else if (type == typeof(System.Web.Services.Description.DocumentableItem)) {
  7016. WriteObject_DocumentableItem1((System.Web.Services.Description.DocumentableItem)ob, element, namesp, isNullable, true, writeWrappingElem);
  7017. return;
  7018. }
  7019. else if (type == typeof(System.Web.Services.Description.Import)) {
  7020. WriteObject_Import((System.Web.Services.Description.Import)ob, element, namesp, isNullable, true, writeWrappingElem);
  7021. return;
  7022. }
  7023. else if (type == typeof(System.Xml.Schema.XmlSchemaObject)) {
  7024. WriteObject_XmlSchemaObject((System.Xml.Schema.XmlSchemaObject)ob, element, namesp, isNullable, true, writeWrappingElem);
  7025. return;
  7026. }
  7027. else if (type == typeof(System.Xml.Schema.XmlSchemaForm)) {
  7028. WriteObject_XmlSchemaForm((System.Xml.Schema.XmlSchemaForm)ob, element, namesp, isNullable, true, writeWrappingElem);
  7029. return;
  7030. }
  7031. else if (type == typeof(System.Xml.Schema.XmlSchemaDerivationMethod)) {
  7032. WriteObject_XmlSchemaDerivationMethod((System.Xml.Schema.XmlSchemaDerivationMethod)ob, element, namesp, isNullable, true, writeWrappingElem);
  7033. return;
  7034. }
  7035. else if (type == typeof(System.Xml.Schema.XmlSchemaExternal)) {
  7036. WriteObject_XmlSchemaExternal((System.Xml.Schema.XmlSchemaExternal)ob, element, namesp, isNullable, true, writeWrappingElem);
  7037. return;
  7038. }
  7039. else if (type == typeof(System.Xml.Schema.XmlSchemaDocumentation)) {
  7040. WriteObject_XmlSchemaDocumentation((System.Xml.Schema.XmlSchemaDocumentation)ob, element, namesp, isNullable, true, writeWrappingElem);
  7041. return;
  7042. }
  7043. else if (type == typeof(System.Xml.Schema.XmlSchemaAppInfo)) {
  7044. WriteObject_XmlSchemaAppInfo((System.Xml.Schema.XmlSchemaAppInfo)ob, element, namesp, isNullable, true, writeWrappingElem);
  7045. return;
  7046. }
  7047. else if (type == typeof(System.Xml.Schema.XmlSchemaAnnotation)) {
  7048. WriteObject_XmlSchemaAnnotation((System.Xml.Schema.XmlSchemaAnnotation)ob, element, namesp, isNullable, true, writeWrappingElem);
  7049. return;
  7050. }
  7051. else if (type == typeof(System.Xml.Schema.XmlSchemaAnnotated)) {
  7052. WriteObject_XmlSchemaAnnotated((System.Xml.Schema.XmlSchemaAnnotated)ob, element, namesp, isNullable, true, writeWrappingElem);
  7053. return;
  7054. }
  7055. else if (type == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef)) {
  7056. WriteObject_XmlSchemaAttributeGroupRef((System.Xml.Schema.XmlSchemaAttributeGroupRef)ob, element, namesp, isNullable, true, writeWrappingElem);
  7057. return;
  7058. }
  7059. else if (type == typeof(System.Xml.Schema.XmlSchemaType)) {
  7060. WriteObject_XmlSchemaType((System.Xml.Schema.XmlSchemaType)ob, element, namesp, isNullable, true, writeWrappingElem);
  7061. return;
  7062. }
  7063. else if (type == typeof(System.Xml.XmlQualifiedName[])) {
  7064. WriteObject_ArrayOfQName((System.Xml.XmlQualifiedName[])ob, element, namesp, isNullable, true, writeWrappingElem);
  7065. return;
  7066. }
  7067. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeContent)) {
  7068. WriteObject_XmlSchemaSimpleTypeContent((System.Xml.Schema.XmlSchemaSimpleTypeContent)ob, element, namesp, isNullable, true, writeWrappingElem);
  7069. return;
  7070. }
  7071. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeUnion)) {
  7072. WriteObject_XmlSchemaSimpleTypeUnion((System.Xml.Schema.XmlSchemaSimpleTypeUnion)ob, element, namesp, isNullable, true, writeWrappingElem);
  7073. return;
  7074. }
  7075. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeList)) {
  7076. WriteObject_XmlSchemaSimpleTypeList((System.Xml.Schema.XmlSchemaSimpleTypeList)ob, element, namesp, isNullable, true, writeWrappingElem);
  7077. return;
  7078. }
  7079. else if (type == typeof(System.Xml.Schema.XmlSchemaFacet)) {
  7080. WriteObject_XmlSchemaFacet((System.Xml.Schema.XmlSchemaFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7081. return;
  7082. }
  7083. else if (type == typeof(System.Xml.Schema.XmlSchemaPatternFacet)) {
  7084. WriteObject_XmlSchemaPatternFacet((System.Xml.Schema.XmlSchemaPatternFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7085. return;
  7086. }
  7087. else if (type == typeof(System.Xml.Schema.XmlSchemaWhiteSpaceFacet)) {
  7088. WriteObject_XmlSchemaWhiteSpaceFacet((System.Xml.Schema.XmlSchemaWhiteSpaceFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7089. return;
  7090. }
  7091. else if (type == typeof(System.Xml.Schema.XmlSchemaEnumerationFacet)) {
  7092. WriteObject_XmlSchemaEnumerationFacet((System.Xml.Schema.XmlSchemaEnumerationFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7093. return;
  7094. }
  7095. else if (type == typeof(System.Xml.Schema.XmlSchemaNumericFacet)) {
  7096. WriteObject_XmlSchemaNumericFacet((System.Xml.Schema.XmlSchemaNumericFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7097. return;
  7098. }
  7099. else if (type == typeof(System.Xml.Schema.XmlSchemaMaxLengthFacet)) {
  7100. WriteObject_XmlSchemaMaxLengthFacet((System.Xml.Schema.XmlSchemaMaxLengthFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7101. return;
  7102. }
  7103. else if (type == typeof(System.Xml.Schema.XmlSchemaMinLengthFacet)) {
  7104. WriteObject_XmlSchemaMinLengthFacet((System.Xml.Schema.XmlSchemaMinLengthFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7105. return;
  7106. }
  7107. else if (type == typeof(System.Xml.Schema.XmlSchemaLengthFacet)) {
  7108. WriteObject_XmlSchemaLengthFacet((System.Xml.Schema.XmlSchemaLengthFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7109. return;
  7110. }
  7111. else if (type == typeof(System.Xml.Schema.XmlSchemaFractionDigitsFacet)) {
  7112. WriteObject_XmlSchemaFractionDigitsFacet((System.Xml.Schema.XmlSchemaFractionDigitsFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7113. return;
  7114. }
  7115. else if (type == typeof(System.Xml.Schema.XmlSchemaTotalDigitsFacet)) {
  7116. WriteObject_XmlSchemaTotalDigitsFacet((System.Xml.Schema.XmlSchemaTotalDigitsFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7117. return;
  7118. }
  7119. else if (type == typeof(System.Xml.Schema.XmlSchemaMaxInclusiveFacet)) {
  7120. WriteObject_XmlSchemaMaxInclusiveFacet((System.Xml.Schema.XmlSchemaMaxInclusiveFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7121. return;
  7122. }
  7123. else if (type == typeof(System.Xml.Schema.XmlSchemaMaxExclusiveFacet)) {
  7124. WriteObject_XmlSchemaMaxExclusiveFacet((System.Xml.Schema.XmlSchemaMaxExclusiveFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7125. return;
  7126. }
  7127. else if (type == typeof(System.Xml.Schema.XmlSchemaMinInclusiveFacet)) {
  7128. WriteObject_XmlSchemaMinInclusiveFacet((System.Xml.Schema.XmlSchemaMinInclusiveFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7129. return;
  7130. }
  7131. else if (type == typeof(System.Xml.Schema.XmlSchemaMinExclusiveFacet)) {
  7132. WriteObject_XmlSchemaMinExclusiveFacet((System.Xml.Schema.XmlSchemaMinExclusiveFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7133. return;
  7134. }
  7135. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeRestriction)) {
  7136. WriteObject_XmlSchemaSimpleTypeRestriction((System.Xml.Schema.XmlSchemaSimpleTypeRestriction)ob, element, namesp, isNullable, true, writeWrappingElem);
  7137. return;
  7138. }
  7139. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleType)) {
  7140. WriteObject_XmlSchemaSimpleType((System.Xml.Schema.XmlSchemaSimpleType)ob, element, namesp, isNullable, true, writeWrappingElem);
  7141. return;
  7142. }
  7143. else if (type == typeof(System.Xml.Schema.XmlSchemaUse)) {
  7144. WriteObject_XmlSchemaUse((System.Xml.Schema.XmlSchemaUse)ob, element, namesp, isNullable, true, writeWrappingElem);
  7145. return;
  7146. }
  7147. else if (type == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
  7148. WriteObject_XmlSchemaAttribute((System.Xml.Schema.XmlSchemaAttribute)ob, element, namesp, isNullable, true, writeWrappingElem);
  7149. return;
  7150. }
  7151. else if (type == typeof(System.Xml.Schema.XmlSchemaContentProcessing)) {
  7152. WriteObject_XmlSchemaContentProcessing((System.Xml.Schema.XmlSchemaContentProcessing)ob, element, namesp, isNullable, true, writeWrappingElem);
  7153. return;
  7154. }
  7155. else if (type == typeof(System.Xml.Schema.XmlSchemaAnyAttribute)) {
  7156. WriteObject_XmlSchemaAnyAttribute((System.Xml.Schema.XmlSchemaAnyAttribute)ob, element, namesp, isNullable, true, writeWrappingElem);
  7157. return;
  7158. }
  7159. else if (type == typeof(System.Xml.Schema.XmlSchemaAttributeGroup)) {
  7160. WriteObject_XmlSchemaAttributeGroup((System.Xml.Schema.XmlSchemaAttributeGroup)ob, element, namesp, isNullable, true, writeWrappingElem);
  7161. return;
  7162. }
  7163. else if (type == typeof(System.Xml.Schema.XmlSchemaParticle)) {
  7164. WriteObject_XmlSchemaParticle((System.Xml.Schema.XmlSchemaParticle)ob, element, namesp, isNullable, true, writeWrappingElem);
  7165. return;
  7166. }
  7167. else if (type == typeof(System.Xml.Schema.XmlSchemaAny)) {
  7168. WriteObject_XmlSchemaAny((System.Xml.Schema.XmlSchemaAny)ob, element, namesp, isNullable, true, writeWrappingElem);
  7169. return;
  7170. }
  7171. else if (type == typeof(System.Xml.Schema.XmlSchemaGroupRef)) {
  7172. WriteObject_XmlSchemaGroupRef((System.Xml.Schema.XmlSchemaGroupRef)ob, element, namesp, isNullable, true, writeWrappingElem);
  7173. return;
  7174. }
  7175. else if (type == typeof(System.Xml.Schema.XmlSchemaGroupBase)) {
  7176. WriteObject_XmlSchemaGroupBase((System.Xml.Schema.XmlSchemaGroupBase)ob, element, namesp, isNullable, true, writeWrappingElem);
  7177. return;
  7178. }
  7179. else if (type == typeof(System.Xml.Schema.XmlSchemaAll)) {
  7180. WriteObject_XmlSchemaAll((System.Xml.Schema.XmlSchemaAll)ob, element, namesp, isNullable, true, writeWrappingElem);
  7181. return;
  7182. }
  7183. else if (type == typeof(System.Xml.Schema.XmlSchemaContent)) {
  7184. WriteObject_XmlSchemaContent((System.Xml.Schema.XmlSchemaContent)ob, element, namesp, isNullable, true, writeWrappingElem);
  7185. return;
  7186. }
  7187. else if (type == typeof(System.Xml.Schema.XmlSchemaComplexContentExtension)) {
  7188. WriteObject_XmlSchemaComplexContentExtension((System.Xml.Schema.XmlSchemaComplexContentExtension)ob, element, namesp, isNullable, true, writeWrappingElem);
  7189. return;
  7190. }
  7191. else if (type == typeof(System.Xml.Schema.XmlSchemaComplexContentRestriction)) {
  7192. WriteObject_XmlSchemaComplexContentRestriction((System.Xml.Schema.XmlSchemaComplexContentRestriction)ob, element, namesp, isNullable, true, writeWrappingElem);
  7193. return;
  7194. }
  7195. else if (type == typeof(System.Xml.Schema.XmlSchemaContentModel)) {
  7196. WriteObject_XmlSchemaContentModel((System.Xml.Schema.XmlSchemaContentModel)ob, element, namesp, isNullable, true, writeWrappingElem);
  7197. return;
  7198. }
  7199. else if (type == typeof(System.Xml.Schema.XmlSchemaComplexContent)) {
  7200. WriteObject_XmlSchemaComplexContent((System.Xml.Schema.XmlSchemaComplexContent)ob, element, namesp, isNullable, true, writeWrappingElem);
  7201. return;
  7202. }
  7203. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleContentExtension)) {
  7204. WriteObject_XmlSchemaSimpleContentExtension((System.Xml.Schema.XmlSchemaSimpleContentExtension)ob, element, namesp, isNullable, true, writeWrappingElem);
  7205. return;
  7206. }
  7207. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleContentRestriction)) {
  7208. WriteObject_XmlSchemaSimpleContentRestriction((System.Xml.Schema.XmlSchemaSimpleContentRestriction)ob, element, namesp, isNullable, true, writeWrappingElem);
  7209. return;
  7210. }
  7211. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleContent)) {
  7212. WriteObject_XmlSchemaSimpleContent((System.Xml.Schema.XmlSchemaSimpleContent)ob, element, namesp, isNullable, true, writeWrappingElem);
  7213. return;
  7214. }
  7215. else if (type == typeof(System.Xml.Schema.XmlSchemaComplexType)) {
  7216. WriteObject_XmlSchemaComplexType((System.Xml.Schema.XmlSchemaComplexType)ob, element, namesp, isNullable, true, writeWrappingElem);
  7217. return;
  7218. }
  7219. else if (type == typeof(System.Xml.Schema.XmlSchemaXPath)) {
  7220. WriteObject_XmlSchemaXPath((System.Xml.Schema.XmlSchemaXPath)ob, element, namesp, isNullable, true, writeWrappingElem);
  7221. return;
  7222. }
  7223. else if (type == typeof(System.Xml.Schema.XmlSchemaIdentityConstraint)) {
  7224. WriteObject_XmlSchemaIdentityConstraint((System.Xml.Schema.XmlSchemaIdentityConstraint)ob, element, namesp, isNullable, true, writeWrappingElem);
  7225. return;
  7226. }
  7227. else if (type == typeof(System.Xml.Schema.XmlSchemaKeyref)) {
  7228. WriteObject_XmlSchemaKeyref((System.Xml.Schema.XmlSchemaKeyref)ob, element, namesp, isNullable, true, writeWrappingElem);
  7229. return;
  7230. }
  7231. else if (type == typeof(System.Xml.Schema.XmlSchemaKey)) {
  7232. WriteObject_XmlSchemaKey((System.Xml.Schema.XmlSchemaKey)ob, element, namesp, isNullable, true, writeWrappingElem);
  7233. return;
  7234. }
  7235. else if (type == typeof(System.Xml.Schema.XmlSchemaUnique)) {
  7236. WriteObject_XmlSchemaUnique((System.Xml.Schema.XmlSchemaUnique)ob, element, namesp, isNullable, true, writeWrappingElem);
  7237. return;
  7238. }
  7239. else if (type == typeof(System.Xml.Schema.XmlSchemaElement)) {
  7240. WriteObject_XmlSchemaElement((System.Xml.Schema.XmlSchemaElement)ob, element, namesp, isNullable, true, writeWrappingElem);
  7241. return;
  7242. }
  7243. else if (type == typeof(System.Xml.Schema.XmlSchemaChoice)) {
  7244. WriteObject_XmlSchemaChoice((System.Xml.Schema.XmlSchemaChoice)ob, element, namesp, isNullable, true, writeWrappingElem);
  7245. return;
  7246. }
  7247. else if (type == typeof(System.Xml.Schema.XmlSchemaSequence)) {
  7248. WriteObject_XmlSchemaSequence((System.Xml.Schema.XmlSchemaSequence)ob, element, namesp, isNullable, true, writeWrappingElem);
  7249. return;
  7250. }
  7251. else if (type == typeof(System.Xml.Schema.XmlSchemaGroup)) {
  7252. WriteObject_XmlSchemaGroup((System.Xml.Schema.XmlSchemaGroup)ob, element, namesp, isNullable, true, writeWrappingElem);
  7253. return;
  7254. }
  7255. else if (type == typeof(System.Xml.Schema.XmlSchemaRedefine)) {
  7256. WriteObject_XmlSchemaRedefine((System.Xml.Schema.XmlSchemaRedefine)ob, element, namesp, isNullable, true, writeWrappingElem);
  7257. return;
  7258. }
  7259. else if (type == typeof(System.Xml.Schema.XmlSchemaImport)) {
  7260. WriteObject_XmlSchemaImport((System.Xml.Schema.XmlSchemaImport)ob, element, namesp, isNullable, true, writeWrappingElem);
  7261. return;
  7262. }
  7263. else if (type == typeof(System.Xml.Schema.XmlSchemaInclude)) {
  7264. WriteObject_XmlSchemaInclude((System.Xml.Schema.XmlSchemaInclude)ob, element, namesp, isNullable, true, writeWrappingElem);
  7265. return;
  7266. }
  7267. else if (type == typeof(System.Xml.Schema.XmlSchemaNotation)) {
  7268. WriteObject_XmlSchemaNotation((System.Xml.Schema.XmlSchemaNotation)ob, element, namesp, isNullable, true, writeWrappingElem);
  7269. return;
  7270. }
  7271. else if (type == typeof(System.Xml.Schema.XmlSchema)) {
  7272. WriteObject_XmlSchema((System.Xml.Schema.XmlSchema)ob, element, namesp, isNullable, true, writeWrappingElem);
  7273. return;
  7274. }
  7275. else if (type == typeof(System.Web.Services.Description.Types)) {
  7276. WriteObject_Types((System.Web.Services.Description.Types)ob, element, namesp, isNullable, true, writeWrappingElem);
  7277. return;
  7278. }
  7279. else if (type == typeof(System.Web.Services.Description.MessagePart)) {
  7280. WriteObject_MessagePart((System.Web.Services.Description.MessagePart)ob, element, namesp, isNullable, true, writeWrappingElem);
  7281. return;
  7282. }
  7283. else if (type == typeof(System.Web.Services.Description.Message)) {
  7284. WriteObject_Message((System.Web.Services.Description.Message)ob, element, namesp, isNullable, true, writeWrappingElem);
  7285. return;
  7286. }
  7287. else if (type == typeof(System.Web.Services.Description.OperationMessage)) {
  7288. WriteObject_OperationMessage((System.Web.Services.Description.OperationMessage)ob, element, namesp, isNullable, true, writeWrappingElem);
  7289. return;
  7290. }
  7291. else if (type == typeof(System.Web.Services.Description.OperationFault)) {
  7292. WriteObject_OperationFault((System.Web.Services.Description.OperationFault)ob, element, namesp, isNullable, true, writeWrappingElem);
  7293. return;
  7294. }
  7295. else if (type == typeof(System.Web.Services.Description.OperationInput)) {
  7296. WriteObject_OperationInput((System.Web.Services.Description.OperationInput)ob, element, namesp, isNullable, true, writeWrappingElem);
  7297. return;
  7298. }
  7299. else if (type == typeof(System.Web.Services.Description.OperationOutput)) {
  7300. WriteObject_OperationOutput((System.Web.Services.Description.OperationOutput)ob, element, namesp, isNullable, true, writeWrappingElem);
  7301. return;
  7302. }
  7303. else if (type == typeof(System.Web.Services.Description.Operation)) {
  7304. WriteObject_Operation((System.Web.Services.Description.Operation)ob, element, namesp, isNullable, true, writeWrappingElem);
  7305. return;
  7306. }
  7307. else if (type == typeof(System.Web.Services.Description.PortType)) {
  7308. WriteObject_PortType((System.Web.Services.Description.PortType)ob, element, namesp, isNullable, true, writeWrappingElem);
  7309. return;
  7310. }
  7311. else if (type == typeof(System.Web.Services.Description.ServiceDescriptionFormatExtensionCollection)) {
  7312. WriteObject_ArrayOfAnyType((System.Web.Services.Description.ServiceDescriptionFormatExtensionCollection)ob, element, namesp, isNullable, true, writeWrappingElem);
  7313. return;
  7314. }
  7315. else if (type == typeof(System.Web.Services.Description.MessageBinding)) {
  7316. WriteObject_MessageBinding((System.Web.Services.Description.MessageBinding)ob, element, namesp, isNullable, true, writeWrappingElem);
  7317. return;
  7318. }
  7319. else if (type == typeof(System.Web.Services.Description.FaultBinding)) {
  7320. WriteObject_FaultBinding((System.Web.Services.Description.FaultBinding)ob, element, namesp, isNullable, true, writeWrappingElem);
  7321. return;
  7322. }
  7323. else if (type == typeof(System.Web.Services.Description.InputBinding)) {
  7324. WriteObject_InputBinding((System.Web.Services.Description.InputBinding)ob, element, namesp, isNullable, true, writeWrappingElem);
  7325. return;
  7326. }
  7327. else if (type == typeof(System.Web.Services.Description.OutputBinding)) {
  7328. WriteObject_OutputBinding((System.Web.Services.Description.OutputBinding)ob, element, namesp, isNullable, true, writeWrappingElem);
  7329. return;
  7330. }
  7331. else if (type == typeof(System.Web.Services.Description.OperationBinding)) {
  7332. WriteObject_OperationBinding((System.Web.Services.Description.OperationBinding)ob, element, namesp, isNullable, true, writeWrappingElem);
  7333. return;
  7334. }
  7335. else if (type == typeof(System.Web.Services.Description.Binding)) {
  7336. WriteObject_Binding((System.Web.Services.Description.Binding)ob, element, namesp, isNullable, true, writeWrappingElem);
  7337. return;
  7338. }
  7339. else if (type == typeof(System.Web.Services.Description.Port)) {
  7340. WriteObject_Port((System.Web.Services.Description.Port)ob, element, namesp, isNullable, true, writeWrappingElem);
  7341. return;
  7342. }
  7343. else if (type == typeof(System.Web.Services.Description.Service)) {
  7344. WriteObject_Service((System.Web.Services.Description.Service)ob, element, namesp, isNullable, true, writeWrappingElem);
  7345. return;
  7346. }
  7347. else if (type == typeof(System.Web.Services.Description.ServiceDescription)) {
  7348. WriteObject_ServiceDescription((System.Web.Services.Description.ServiceDescription)ob, element, namesp, isNullable, true, writeWrappingElem);
  7349. return;
  7350. }
  7351. else {
  7352. WriteTypedPrimitive (element, namesp, ob, true);
  7353. return;
  7354. }
  7355. }
  7356. void WriteObject_DocumentableItem (System.Web.Services.Description.DocumentableItem ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  7357. {
  7358. if (((object)ob) == null)
  7359. {
  7360. if (isNullable)
  7361. WriteNullTagLiteral(element, namesp);
  7362. return;
  7363. }
  7364. System.Type type = ob.GetType ();
  7365. if (type == typeof(System.Web.Services.Description.DocumentableItem))
  7366. { }
  7367. else if (type == typeof(System.Web.Services.Description.ServiceDescription)) {
  7368. WriteObject_ServiceDescription((System.Web.Services.Description.ServiceDescription)ob, element, namesp, isNullable, true, writeWrappingElem);
  7369. return;
  7370. }
  7371. else {
  7372. throw CreateUnknownTypeException (ob);
  7373. }
  7374. if (writeWrappingElem) {
  7375. WriteStartElement (element, namesp, ob);
  7376. }
  7377. if (needType) WriteXsiType("DocumentableItem", "");
  7378. if (ob.@DocumentationElement != null) {
  7379. XmlNode o234 = ob.@DocumentationElement;
  7380. if (o234 is XmlElement) {
  7381. if ((o234.Name == "documentation" && o234.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
  7382. }
  7383. else o234.WriteTo (Writer);
  7384. WriteElementLiteral (o234, "", "", false, true);
  7385. }
  7386. else
  7387. throw CreateUnknownAnyElementException (o234.Name, o234.NamespaceURI);
  7388. }
  7389. if (writeWrappingElem) WriteEndElement (ob);
  7390. }
  7391. void WriteObject_DocumentableItem1 (System.Web.Services.Description.DocumentableItem ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  7392. {
  7393. if (((object)ob) == null)
  7394. {
  7395. if (isNullable)
  7396. WriteNullTagLiteral(element, namesp);
  7397. return;
  7398. }
  7399. System.Type type = ob.GetType ();
  7400. if (type == typeof(System.Web.Services.Description.DocumentableItem))
  7401. { }
  7402. else if (type == typeof(System.Web.Services.Description.Import)) {
  7403. WriteObject_Import((System.Web.Services.Description.Import)ob, element, namesp, isNullable, true, writeWrappingElem);
  7404. return;
  7405. }
  7406. else if (type == typeof(System.Web.Services.Description.Types)) {
  7407. WriteObject_Types((System.Web.Services.Description.Types)ob, element, namesp, isNullable, true, writeWrappingElem);
  7408. return;
  7409. }
  7410. else if (type == typeof(System.Web.Services.Description.MessagePart)) {
  7411. WriteObject_MessagePart((System.Web.Services.Description.MessagePart)ob, element, namesp, isNullable, true, writeWrappingElem);
  7412. return;
  7413. }
  7414. else if (type == typeof(System.Web.Services.Description.Message)) {
  7415. WriteObject_Message((System.Web.Services.Description.Message)ob, element, namesp, isNullable, true, writeWrappingElem);
  7416. return;
  7417. }
  7418. else if (type == typeof(System.Web.Services.Description.OperationMessage)) {
  7419. WriteObject_OperationMessage((System.Web.Services.Description.OperationMessage)ob, element, namesp, isNullable, true, writeWrappingElem);
  7420. return;
  7421. }
  7422. else if (type == typeof(System.Web.Services.Description.OperationFault)) {
  7423. WriteObject_OperationFault((System.Web.Services.Description.OperationFault)ob, element, namesp, isNullable, true, writeWrappingElem);
  7424. return;
  7425. }
  7426. else if (type == typeof(System.Web.Services.Description.OperationInput)) {
  7427. WriteObject_OperationInput((System.Web.Services.Description.OperationInput)ob, element, namesp, isNullable, true, writeWrappingElem);
  7428. return;
  7429. }
  7430. else if (type == typeof(System.Web.Services.Description.OperationOutput)) {
  7431. WriteObject_OperationOutput((System.Web.Services.Description.OperationOutput)ob, element, namesp, isNullable, true, writeWrappingElem);
  7432. return;
  7433. }
  7434. else if (type == typeof(System.Web.Services.Description.Operation)) {
  7435. WriteObject_Operation((System.Web.Services.Description.Operation)ob, element, namesp, isNullable, true, writeWrappingElem);
  7436. return;
  7437. }
  7438. else if (type == typeof(System.Web.Services.Description.PortType)) {
  7439. WriteObject_PortType((System.Web.Services.Description.PortType)ob, element, namesp, isNullable, true, writeWrappingElem);
  7440. return;
  7441. }
  7442. else if (type == typeof(System.Web.Services.Description.MessageBinding)) {
  7443. WriteObject_MessageBinding((System.Web.Services.Description.MessageBinding)ob, element, namesp, isNullable, true, writeWrappingElem);
  7444. return;
  7445. }
  7446. else if (type == typeof(System.Web.Services.Description.FaultBinding)) {
  7447. WriteObject_FaultBinding((System.Web.Services.Description.FaultBinding)ob, element, namesp, isNullable, true, writeWrappingElem);
  7448. return;
  7449. }
  7450. else if (type == typeof(System.Web.Services.Description.InputBinding)) {
  7451. WriteObject_InputBinding((System.Web.Services.Description.InputBinding)ob, element, namesp, isNullable, true, writeWrappingElem);
  7452. return;
  7453. }
  7454. else if (type == typeof(System.Web.Services.Description.OutputBinding)) {
  7455. WriteObject_OutputBinding((System.Web.Services.Description.OutputBinding)ob, element, namesp, isNullable, true, writeWrappingElem);
  7456. return;
  7457. }
  7458. else if (type == typeof(System.Web.Services.Description.OperationBinding)) {
  7459. WriteObject_OperationBinding((System.Web.Services.Description.OperationBinding)ob, element, namesp, isNullable, true, writeWrappingElem);
  7460. return;
  7461. }
  7462. else if (type == typeof(System.Web.Services.Description.Binding)) {
  7463. WriteObject_Binding((System.Web.Services.Description.Binding)ob, element, namesp, isNullable, true, writeWrappingElem);
  7464. return;
  7465. }
  7466. else if (type == typeof(System.Web.Services.Description.Port)) {
  7467. WriteObject_Port((System.Web.Services.Description.Port)ob, element, namesp, isNullable, true, writeWrappingElem);
  7468. return;
  7469. }
  7470. else if (type == typeof(System.Web.Services.Description.Service)) {
  7471. WriteObject_Service((System.Web.Services.Description.Service)ob, element, namesp, isNullable, true, writeWrappingElem);
  7472. return;
  7473. }
  7474. else {
  7475. throw CreateUnknownTypeException (ob);
  7476. }
  7477. if (writeWrappingElem) {
  7478. WriteStartElement (element, namesp, ob);
  7479. }
  7480. if (needType) WriteXsiType("DocumentableItem", "http://schemas.xmlsoap.org/wsdl/");
  7481. if (ob.@DocumentationElement != null) {
  7482. XmlNode o235 = ob.@DocumentationElement;
  7483. if (o235 is XmlElement) {
  7484. if ((o235.Name == "documentation" && o235.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
  7485. }
  7486. else o235.WriteTo (Writer);
  7487. WriteElementLiteral (o235, "", "", false, true);
  7488. }
  7489. else
  7490. throw CreateUnknownAnyElementException (o235.Name, o235.NamespaceURI);
  7491. }
  7492. if (writeWrappingElem) WriteEndElement (ob);
  7493. }
  7494. void WriteObject_XmlSchemaObject (System.Xml.Schema.XmlSchemaObject ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  7495. {
  7496. if (((object)ob) == null)
  7497. {
  7498. if (isNullable)
  7499. WriteNullTagLiteral(element, namesp);
  7500. return;
  7501. }
  7502. System.Type type = ob.GetType ();
  7503. if (type == typeof(System.Xml.Schema.XmlSchemaObject))
  7504. { }
  7505. else if (type == typeof(System.Xml.Schema.XmlSchemaExternal)) {
  7506. WriteObject_XmlSchemaExternal((System.Xml.Schema.XmlSchemaExternal)ob, element, namesp, isNullable, true, writeWrappingElem);
  7507. return;
  7508. }
  7509. else if (type == typeof(System.Xml.Schema.XmlSchemaDocumentation)) {
  7510. WriteObject_XmlSchemaDocumentation((System.Xml.Schema.XmlSchemaDocumentation)ob, element, namesp, isNullable, true, writeWrappingElem);
  7511. return;
  7512. }
  7513. else if (type == typeof(System.Xml.Schema.XmlSchemaAppInfo)) {
  7514. WriteObject_XmlSchemaAppInfo((System.Xml.Schema.XmlSchemaAppInfo)ob, element, namesp, isNullable, true, writeWrappingElem);
  7515. return;
  7516. }
  7517. else if (type == typeof(System.Xml.Schema.XmlSchemaAnnotation)) {
  7518. WriteObject_XmlSchemaAnnotation((System.Xml.Schema.XmlSchemaAnnotation)ob, element, namesp, isNullable, true, writeWrappingElem);
  7519. return;
  7520. }
  7521. else if (type == typeof(System.Xml.Schema.XmlSchemaAnnotated)) {
  7522. WriteObject_XmlSchemaAnnotated((System.Xml.Schema.XmlSchemaAnnotated)ob, element, namesp, isNullable, true, writeWrappingElem);
  7523. return;
  7524. }
  7525. else if (type == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef)) {
  7526. WriteObject_XmlSchemaAttributeGroupRef((System.Xml.Schema.XmlSchemaAttributeGroupRef)ob, element, namesp, isNullable, true, writeWrappingElem);
  7527. return;
  7528. }
  7529. else if (type == typeof(System.Xml.Schema.XmlSchemaType)) {
  7530. WriteObject_XmlSchemaType((System.Xml.Schema.XmlSchemaType)ob, element, namesp, isNullable, true, writeWrappingElem);
  7531. return;
  7532. }
  7533. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeContent)) {
  7534. WriteObject_XmlSchemaSimpleTypeContent((System.Xml.Schema.XmlSchemaSimpleTypeContent)ob, element, namesp, isNullable, true, writeWrappingElem);
  7535. return;
  7536. }
  7537. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeUnion)) {
  7538. WriteObject_XmlSchemaSimpleTypeUnion((System.Xml.Schema.XmlSchemaSimpleTypeUnion)ob, element, namesp, isNullable, true, writeWrappingElem);
  7539. return;
  7540. }
  7541. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeList)) {
  7542. WriteObject_XmlSchemaSimpleTypeList((System.Xml.Schema.XmlSchemaSimpleTypeList)ob, element, namesp, isNullable, true, writeWrappingElem);
  7543. return;
  7544. }
  7545. else if (type == typeof(System.Xml.Schema.XmlSchemaFacet)) {
  7546. WriteObject_XmlSchemaFacet((System.Xml.Schema.XmlSchemaFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7547. return;
  7548. }
  7549. else if (type == typeof(System.Xml.Schema.XmlSchemaPatternFacet)) {
  7550. WriteObject_XmlSchemaPatternFacet((System.Xml.Schema.XmlSchemaPatternFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7551. return;
  7552. }
  7553. else if (type == typeof(System.Xml.Schema.XmlSchemaWhiteSpaceFacet)) {
  7554. WriteObject_XmlSchemaWhiteSpaceFacet((System.Xml.Schema.XmlSchemaWhiteSpaceFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7555. return;
  7556. }
  7557. else if (type == typeof(System.Xml.Schema.XmlSchemaEnumerationFacet)) {
  7558. WriteObject_XmlSchemaEnumerationFacet((System.Xml.Schema.XmlSchemaEnumerationFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7559. return;
  7560. }
  7561. else if (type == typeof(System.Xml.Schema.XmlSchemaNumericFacet)) {
  7562. WriteObject_XmlSchemaNumericFacet((System.Xml.Schema.XmlSchemaNumericFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7563. return;
  7564. }
  7565. else if (type == typeof(System.Xml.Schema.XmlSchemaMaxLengthFacet)) {
  7566. WriteObject_XmlSchemaMaxLengthFacet((System.Xml.Schema.XmlSchemaMaxLengthFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7567. return;
  7568. }
  7569. else if (type == typeof(System.Xml.Schema.XmlSchemaMinLengthFacet)) {
  7570. WriteObject_XmlSchemaMinLengthFacet((System.Xml.Schema.XmlSchemaMinLengthFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7571. return;
  7572. }
  7573. else if (type == typeof(System.Xml.Schema.XmlSchemaLengthFacet)) {
  7574. WriteObject_XmlSchemaLengthFacet((System.Xml.Schema.XmlSchemaLengthFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7575. return;
  7576. }
  7577. else if (type == typeof(System.Xml.Schema.XmlSchemaFractionDigitsFacet)) {
  7578. WriteObject_XmlSchemaFractionDigitsFacet((System.Xml.Schema.XmlSchemaFractionDigitsFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7579. return;
  7580. }
  7581. else if (type == typeof(System.Xml.Schema.XmlSchemaTotalDigitsFacet)) {
  7582. WriteObject_XmlSchemaTotalDigitsFacet((System.Xml.Schema.XmlSchemaTotalDigitsFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7583. return;
  7584. }
  7585. else if (type == typeof(System.Xml.Schema.XmlSchemaMaxInclusiveFacet)) {
  7586. WriteObject_XmlSchemaMaxInclusiveFacet((System.Xml.Schema.XmlSchemaMaxInclusiveFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7587. return;
  7588. }
  7589. else if (type == typeof(System.Xml.Schema.XmlSchemaMaxExclusiveFacet)) {
  7590. WriteObject_XmlSchemaMaxExclusiveFacet((System.Xml.Schema.XmlSchemaMaxExclusiveFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7591. return;
  7592. }
  7593. else if (type == typeof(System.Xml.Schema.XmlSchemaMinInclusiveFacet)) {
  7594. WriteObject_XmlSchemaMinInclusiveFacet((System.Xml.Schema.XmlSchemaMinInclusiveFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7595. return;
  7596. }
  7597. else if (type == typeof(System.Xml.Schema.XmlSchemaMinExclusiveFacet)) {
  7598. WriteObject_XmlSchemaMinExclusiveFacet((System.Xml.Schema.XmlSchemaMinExclusiveFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7599. return;
  7600. }
  7601. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeRestriction)) {
  7602. WriteObject_XmlSchemaSimpleTypeRestriction((System.Xml.Schema.XmlSchemaSimpleTypeRestriction)ob, element, namesp, isNullable, true, writeWrappingElem);
  7603. return;
  7604. }
  7605. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleType)) {
  7606. WriteObject_XmlSchemaSimpleType((System.Xml.Schema.XmlSchemaSimpleType)ob, element, namesp, isNullable, true, writeWrappingElem);
  7607. return;
  7608. }
  7609. else if (type == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
  7610. WriteObject_XmlSchemaAttribute((System.Xml.Schema.XmlSchemaAttribute)ob, element, namesp, isNullable, true, writeWrappingElem);
  7611. return;
  7612. }
  7613. else if (type == typeof(System.Xml.Schema.XmlSchemaAnyAttribute)) {
  7614. WriteObject_XmlSchemaAnyAttribute((System.Xml.Schema.XmlSchemaAnyAttribute)ob, element, namesp, isNullable, true, writeWrappingElem);
  7615. return;
  7616. }
  7617. else if (type == typeof(System.Xml.Schema.XmlSchemaAttributeGroup)) {
  7618. WriteObject_XmlSchemaAttributeGroup((System.Xml.Schema.XmlSchemaAttributeGroup)ob, element, namesp, isNullable, true, writeWrappingElem);
  7619. return;
  7620. }
  7621. else if (type == typeof(System.Xml.Schema.XmlSchemaParticle)) {
  7622. WriteObject_XmlSchemaParticle((System.Xml.Schema.XmlSchemaParticle)ob, element, namesp, isNullable, true, writeWrappingElem);
  7623. return;
  7624. }
  7625. else if (type == typeof(System.Xml.Schema.XmlSchemaAny)) {
  7626. WriteObject_XmlSchemaAny((System.Xml.Schema.XmlSchemaAny)ob, element, namesp, isNullable, true, writeWrappingElem);
  7627. return;
  7628. }
  7629. else if (type == typeof(System.Xml.Schema.XmlSchemaGroupRef)) {
  7630. WriteObject_XmlSchemaGroupRef((System.Xml.Schema.XmlSchemaGroupRef)ob, element, namesp, isNullable, true, writeWrappingElem);
  7631. return;
  7632. }
  7633. else if (type == typeof(System.Xml.Schema.XmlSchemaGroupBase)) {
  7634. WriteObject_XmlSchemaGroupBase((System.Xml.Schema.XmlSchemaGroupBase)ob, element, namesp, isNullable, true, writeWrappingElem);
  7635. return;
  7636. }
  7637. else if (type == typeof(System.Xml.Schema.XmlSchemaAll)) {
  7638. WriteObject_XmlSchemaAll((System.Xml.Schema.XmlSchemaAll)ob, element, namesp, isNullable, true, writeWrappingElem);
  7639. return;
  7640. }
  7641. else if (type == typeof(System.Xml.Schema.XmlSchemaContent)) {
  7642. WriteObject_XmlSchemaContent((System.Xml.Schema.XmlSchemaContent)ob, element, namesp, isNullable, true, writeWrappingElem);
  7643. return;
  7644. }
  7645. else if (type == typeof(System.Xml.Schema.XmlSchemaComplexContentExtension)) {
  7646. WriteObject_XmlSchemaComplexContentExtension((System.Xml.Schema.XmlSchemaComplexContentExtension)ob, element, namesp, isNullable, true, writeWrappingElem);
  7647. return;
  7648. }
  7649. else if (type == typeof(System.Xml.Schema.XmlSchemaComplexContentRestriction)) {
  7650. WriteObject_XmlSchemaComplexContentRestriction((System.Xml.Schema.XmlSchemaComplexContentRestriction)ob, element, namesp, isNullable, true, writeWrappingElem);
  7651. return;
  7652. }
  7653. else if (type == typeof(System.Xml.Schema.XmlSchemaContentModel)) {
  7654. WriteObject_XmlSchemaContentModel((System.Xml.Schema.XmlSchemaContentModel)ob, element, namesp, isNullable, true, writeWrappingElem);
  7655. return;
  7656. }
  7657. else if (type == typeof(System.Xml.Schema.XmlSchemaComplexContent)) {
  7658. WriteObject_XmlSchemaComplexContent((System.Xml.Schema.XmlSchemaComplexContent)ob, element, namesp, isNullable, true, writeWrappingElem);
  7659. return;
  7660. }
  7661. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleContentExtension)) {
  7662. WriteObject_XmlSchemaSimpleContentExtension((System.Xml.Schema.XmlSchemaSimpleContentExtension)ob, element, namesp, isNullable, true, writeWrappingElem);
  7663. return;
  7664. }
  7665. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleContentRestriction)) {
  7666. WriteObject_XmlSchemaSimpleContentRestriction((System.Xml.Schema.XmlSchemaSimpleContentRestriction)ob, element, namesp, isNullable, true, writeWrappingElem);
  7667. return;
  7668. }
  7669. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleContent)) {
  7670. WriteObject_XmlSchemaSimpleContent((System.Xml.Schema.XmlSchemaSimpleContent)ob, element, namesp, isNullable, true, writeWrappingElem);
  7671. return;
  7672. }
  7673. else if (type == typeof(System.Xml.Schema.XmlSchemaComplexType)) {
  7674. WriteObject_XmlSchemaComplexType((System.Xml.Schema.XmlSchemaComplexType)ob, element, namesp, isNullable, true, writeWrappingElem);
  7675. return;
  7676. }
  7677. else if (type == typeof(System.Xml.Schema.XmlSchemaXPath)) {
  7678. WriteObject_XmlSchemaXPath((System.Xml.Schema.XmlSchemaXPath)ob, element, namesp, isNullable, true, writeWrappingElem);
  7679. return;
  7680. }
  7681. else if (type == typeof(System.Xml.Schema.XmlSchemaIdentityConstraint)) {
  7682. WriteObject_XmlSchemaIdentityConstraint((System.Xml.Schema.XmlSchemaIdentityConstraint)ob, element, namesp, isNullable, true, writeWrappingElem);
  7683. return;
  7684. }
  7685. else if (type == typeof(System.Xml.Schema.XmlSchemaKeyref)) {
  7686. WriteObject_XmlSchemaKeyref((System.Xml.Schema.XmlSchemaKeyref)ob, element, namesp, isNullable, true, writeWrappingElem);
  7687. return;
  7688. }
  7689. else if (type == typeof(System.Xml.Schema.XmlSchemaKey)) {
  7690. WriteObject_XmlSchemaKey((System.Xml.Schema.XmlSchemaKey)ob, element, namesp, isNullable, true, writeWrappingElem);
  7691. return;
  7692. }
  7693. else if (type == typeof(System.Xml.Schema.XmlSchemaUnique)) {
  7694. WriteObject_XmlSchemaUnique((System.Xml.Schema.XmlSchemaUnique)ob, element, namesp, isNullable, true, writeWrappingElem);
  7695. return;
  7696. }
  7697. else if (type == typeof(System.Xml.Schema.XmlSchemaElement)) {
  7698. WriteObject_XmlSchemaElement((System.Xml.Schema.XmlSchemaElement)ob, element, namesp, isNullable, true, writeWrappingElem);
  7699. return;
  7700. }
  7701. else if (type == typeof(System.Xml.Schema.XmlSchemaChoice)) {
  7702. WriteObject_XmlSchemaChoice((System.Xml.Schema.XmlSchemaChoice)ob, element, namesp, isNullable, true, writeWrappingElem);
  7703. return;
  7704. }
  7705. else if (type == typeof(System.Xml.Schema.XmlSchemaSequence)) {
  7706. WriteObject_XmlSchemaSequence((System.Xml.Schema.XmlSchemaSequence)ob, element, namesp, isNullable, true, writeWrappingElem);
  7707. return;
  7708. }
  7709. else if (type == typeof(System.Xml.Schema.XmlSchemaGroup)) {
  7710. WriteObject_XmlSchemaGroup((System.Xml.Schema.XmlSchemaGroup)ob, element, namesp, isNullable, true, writeWrappingElem);
  7711. return;
  7712. }
  7713. else if (type == typeof(System.Xml.Schema.XmlSchemaRedefine)) {
  7714. WriteObject_XmlSchemaRedefine((System.Xml.Schema.XmlSchemaRedefine)ob, element, namesp, isNullable, true, writeWrappingElem);
  7715. return;
  7716. }
  7717. else if (type == typeof(System.Xml.Schema.XmlSchemaImport)) {
  7718. WriteObject_XmlSchemaImport((System.Xml.Schema.XmlSchemaImport)ob, element, namesp, isNullable, true, writeWrappingElem);
  7719. return;
  7720. }
  7721. else if (type == typeof(System.Xml.Schema.XmlSchemaInclude)) {
  7722. WriteObject_XmlSchemaInclude((System.Xml.Schema.XmlSchemaInclude)ob, element, namesp, isNullable, true, writeWrappingElem);
  7723. return;
  7724. }
  7725. else if (type == typeof(System.Xml.Schema.XmlSchemaNotation)) {
  7726. WriteObject_XmlSchemaNotation((System.Xml.Schema.XmlSchemaNotation)ob, element, namesp, isNullable, true, writeWrappingElem);
  7727. return;
  7728. }
  7729. else if (type == typeof(System.Xml.Schema.XmlSchema)) {
  7730. WriteObject_XmlSchema((System.Xml.Schema.XmlSchema)ob, element, namesp, isNullable, true, writeWrappingElem);
  7731. return;
  7732. }
  7733. else {
  7734. throw CreateUnknownTypeException (ob);
  7735. }
  7736. if (writeWrappingElem) {
  7737. WriteStartElement (element, namesp, ob);
  7738. }
  7739. if (needType) WriteXsiType("XmlSchemaObject", "http://www.w3.org/2001/XMLSchema");
  7740. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  7741. if (writeWrappingElem) WriteEndElement (ob);
  7742. }
  7743. void WriteObject_XmlSchemaForm (System.Xml.Schema.XmlSchemaForm ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  7744. {
  7745. System.Type type = ob.GetType ();
  7746. if (type == typeof(System.Xml.Schema.XmlSchemaForm))
  7747. { }
  7748. else {
  7749. throw CreateUnknownTypeException (ob);
  7750. }
  7751. if (writeWrappingElem) {
  7752. WriteStartElement (element, namesp, ob);
  7753. }
  7754. if (needType) WriteXsiType("XmlSchemaForm", "");
  7755. Writer.WriteString (GetEnumValue_XmlSchemaForm (ob));
  7756. if (writeWrappingElem) WriteEndElement (ob);
  7757. }
  7758. string GetEnumValue_XmlSchemaForm (System.Xml.Schema.XmlSchemaForm val)
  7759. {
  7760. switch (val) {
  7761. case System.Xml.Schema.XmlSchemaForm.Qualified: return "qualified";
  7762. case System.Xml.Schema.XmlSchemaForm.Unqualified: return "unqualified";
  7763. default: return ((long)val).ToString(CultureInfo.InvariantCulture);
  7764. }
  7765. }
  7766. void WriteObject_XmlSchemaDerivationMethod (System.Xml.Schema.XmlSchemaDerivationMethod ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  7767. {
  7768. System.Type type = ob.GetType ();
  7769. if (type == typeof(System.Xml.Schema.XmlSchemaDerivationMethod))
  7770. { }
  7771. else {
  7772. throw CreateUnknownTypeException (ob);
  7773. }
  7774. if (writeWrappingElem) {
  7775. WriteStartElement (element, namesp, ob);
  7776. }
  7777. if (needType) WriteXsiType("XmlSchemaDerivationMethod", "");
  7778. Writer.WriteString (GetEnumValue_XmlSchemaDerivationMethod (ob));
  7779. if (writeWrappingElem) WriteEndElement (ob);
  7780. }
  7781. static readonly string[] _xmlNamesXmlSchemaDerivationMethod = { "","substitution","extension","restriction","list","union","#all" };
  7782. static readonly long[] _valuesXmlSchemaDerivationMethod = { 0L,1L,2L,4L,8L,16L,255L };
  7783. string GetEnumValue_XmlSchemaDerivationMethod (System.Xml.Schema.XmlSchemaDerivationMethod val)
  7784. {
  7785. switch (val) {
  7786. case System.Xml.Schema.XmlSchemaDerivationMethod.Empty: return "";
  7787. case System.Xml.Schema.XmlSchemaDerivationMethod.Substitution: return "substitution";
  7788. case System.Xml.Schema.XmlSchemaDerivationMethod.Extension: return "extension";
  7789. case System.Xml.Schema.XmlSchemaDerivationMethod.Restriction: return "restriction";
  7790. case System.Xml.Schema.XmlSchemaDerivationMethod.List: return "list";
  7791. case System.Xml.Schema.XmlSchemaDerivationMethod.Union: return "union";
  7792. case System.Xml.Schema.XmlSchemaDerivationMethod.All: return "#all";
  7793. default:
  7794. if (val.ToString () == "0") return string.Empty;
  7795. return FromEnum ((long) val, _xmlNamesXmlSchemaDerivationMethod, _valuesXmlSchemaDerivationMethod);
  7796. }
  7797. }
  7798. void WriteObject_XmlSchemaExternal (System.Xml.Schema.XmlSchemaExternal ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  7799. {
  7800. if (((object)ob) == null)
  7801. {
  7802. if (isNullable)
  7803. WriteNullTagLiteral(element, namesp);
  7804. return;
  7805. }
  7806. System.Type type = ob.GetType ();
  7807. if (type == typeof(System.Xml.Schema.XmlSchemaExternal))
  7808. { }
  7809. else if (type == typeof(System.Xml.Schema.XmlSchemaRedefine)) {
  7810. WriteObject_XmlSchemaRedefine((System.Xml.Schema.XmlSchemaRedefine)ob, element, namesp, isNullable, true, writeWrappingElem);
  7811. return;
  7812. }
  7813. else if (type == typeof(System.Xml.Schema.XmlSchemaImport)) {
  7814. WriteObject_XmlSchemaImport((System.Xml.Schema.XmlSchemaImport)ob, element, namesp, isNullable, true, writeWrappingElem);
  7815. return;
  7816. }
  7817. else if (type == typeof(System.Xml.Schema.XmlSchemaInclude)) {
  7818. WriteObject_XmlSchemaInclude((System.Xml.Schema.XmlSchemaInclude)ob, element, namesp, isNullable, true, writeWrappingElem);
  7819. return;
  7820. }
  7821. else {
  7822. throw CreateUnknownTypeException (ob);
  7823. }
  7824. if (writeWrappingElem) {
  7825. WriteStartElement (element, namesp, ob);
  7826. }
  7827. if (needType) WriteXsiType("XmlSchemaExternal", "http://www.w3.org/2001/XMLSchema");
  7828. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  7829. ICollection o236 = ob.@UnhandledAttributes;
  7830. if (o236 != null) {
  7831. foreach (XmlAttribute o237 in o236)
  7832. if (o237.NamespaceURI != xmlNamespace)
  7833. WriteXmlAttribute (o237, ob);
  7834. }
  7835. WriteAttribute ("schemaLocation", "", ((ob.@SchemaLocation != null) ? (ob.@SchemaLocation).ToString() : null));
  7836. WriteAttribute ("id", "", ob.@Id);
  7837. if (writeWrappingElem) WriteEndElement (ob);
  7838. }
  7839. void WriteObject_XmlSchemaDocumentation (System.Xml.Schema.XmlSchemaDocumentation ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  7840. {
  7841. if (((object)ob) == null)
  7842. {
  7843. if (isNullable)
  7844. WriteNullTagLiteral(element, namesp);
  7845. return;
  7846. }
  7847. System.Type type = ob.GetType ();
  7848. if (type == typeof(System.Xml.Schema.XmlSchemaDocumentation))
  7849. { }
  7850. else {
  7851. throw CreateUnknownTypeException (ob);
  7852. }
  7853. if (writeWrappingElem) {
  7854. WriteStartElement (element, namesp, ob);
  7855. }
  7856. if (needType) WriteXsiType("XmlSchemaDocumentation", "http://www.w3.org/2001/XMLSchema");
  7857. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  7858. WriteAttribute ("source", "", ((ob.@Source != null) ? (ob.@Source).ToString() : null));
  7859. WriteAttribute ("xml_x003A_lang", "", ob.@Language);
  7860. if (ob.@Markup != null) {
  7861. foreach (XmlNode o238 in ob.@Markup) {
  7862. XmlNode o239 = o238;
  7863. if (o239 is XmlElement) {
  7864. }
  7865. else o239.WriteTo (Writer);
  7866. WriteElementLiteral (o239, "", "", false, true);
  7867. }
  7868. }
  7869. if (writeWrappingElem) WriteEndElement (ob);
  7870. }
  7871. void WriteObject_XmlSchemaAppInfo (System.Xml.Schema.XmlSchemaAppInfo ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  7872. {
  7873. if (((object)ob) == null)
  7874. {
  7875. if (isNullable)
  7876. WriteNullTagLiteral(element, namesp);
  7877. return;
  7878. }
  7879. System.Type type = ob.GetType ();
  7880. if (type == typeof(System.Xml.Schema.XmlSchemaAppInfo))
  7881. { }
  7882. else {
  7883. throw CreateUnknownTypeException (ob);
  7884. }
  7885. if (writeWrappingElem) {
  7886. WriteStartElement (element, namesp, ob);
  7887. }
  7888. if (needType) WriteXsiType("XmlSchemaAppInfo", "http://www.w3.org/2001/XMLSchema");
  7889. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  7890. WriteAttribute ("source", "", ((ob.@Source != null) ? (ob.@Source).ToString() : null));
  7891. if (ob.@Markup != null) {
  7892. foreach (XmlNode o240 in ob.@Markup) {
  7893. XmlNode o241 = o240;
  7894. if (o241 is XmlElement) {
  7895. }
  7896. else o241.WriteTo (Writer);
  7897. WriteElementLiteral (o241, "", "", false, true);
  7898. }
  7899. }
  7900. if (writeWrappingElem) WriteEndElement (ob);
  7901. }
  7902. void WriteObject_XmlSchemaAnnotation (System.Xml.Schema.XmlSchemaAnnotation ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  7903. {
  7904. if (((object)ob) == null)
  7905. {
  7906. if (isNullable)
  7907. WriteNullTagLiteral(element, namesp);
  7908. return;
  7909. }
  7910. System.Type type = ob.GetType ();
  7911. if (type == typeof(System.Xml.Schema.XmlSchemaAnnotation))
  7912. { }
  7913. else {
  7914. throw CreateUnknownTypeException (ob);
  7915. }
  7916. if (writeWrappingElem) {
  7917. WriteStartElement (element, namesp, ob);
  7918. }
  7919. if (needType) WriteXsiType("XmlSchemaAnnotation", "http://www.w3.org/2001/XMLSchema");
  7920. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  7921. ICollection o242 = ob.@UnhandledAttributes;
  7922. if (o242 != null) {
  7923. foreach (XmlAttribute o243 in o242)
  7924. if (o243.NamespaceURI != xmlNamespace)
  7925. WriteXmlAttribute (o243, ob);
  7926. }
  7927. WriteAttribute ("id", "", ob.@Id);
  7928. if (ob.@Items != null) {
  7929. for (int n244 = 0; n244 < [email protected]; n244++) {
  7930. if (((object)ob.@Items[n244]) == null) { }
  7931. else if (ob.@Items[n244].GetType() == typeof(System.Xml.Schema.XmlSchemaDocumentation)) {
  7932. WriteObject_XmlSchemaDocumentation (((System.Xml.Schema.XmlSchemaDocumentation) ob.@Items[n244]), "documentation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  7933. }
  7934. else if (ob.@Items[n244].GetType() == typeof(System.Xml.Schema.XmlSchemaAppInfo)) {
  7935. WriteObject_XmlSchemaAppInfo (((System.Xml.Schema.XmlSchemaAppInfo) ob.@Items[n244]), "appinfo", "http://www.w3.org/2001/XMLSchema", false, false, true);
  7936. }
  7937. else throw CreateUnknownTypeException (ob.@Items[n244]);
  7938. }
  7939. }
  7940. if (writeWrappingElem) WriteEndElement (ob);
  7941. }
  7942. void WriteObject_XmlSchemaAnnotated (System.Xml.Schema.XmlSchemaAnnotated ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  7943. {
  7944. if (((object)ob) == null)
  7945. {
  7946. if (isNullable)
  7947. WriteNullTagLiteral(element, namesp);
  7948. return;
  7949. }
  7950. System.Type type = ob.GetType ();
  7951. if (type == typeof(System.Xml.Schema.XmlSchemaAnnotated))
  7952. { }
  7953. else if (type == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef)) {
  7954. WriteObject_XmlSchemaAttributeGroupRef((System.Xml.Schema.XmlSchemaAttributeGroupRef)ob, element, namesp, isNullable, true, writeWrappingElem);
  7955. return;
  7956. }
  7957. else if (type == typeof(System.Xml.Schema.XmlSchemaType)) {
  7958. WriteObject_XmlSchemaType((System.Xml.Schema.XmlSchemaType)ob, element, namesp, isNullable, true, writeWrappingElem);
  7959. return;
  7960. }
  7961. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeContent)) {
  7962. WriteObject_XmlSchemaSimpleTypeContent((System.Xml.Schema.XmlSchemaSimpleTypeContent)ob, element, namesp, isNullable, true, writeWrappingElem);
  7963. return;
  7964. }
  7965. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeUnion)) {
  7966. WriteObject_XmlSchemaSimpleTypeUnion((System.Xml.Schema.XmlSchemaSimpleTypeUnion)ob, element, namesp, isNullable, true, writeWrappingElem);
  7967. return;
  7968. }
  7969. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeList)) {
  7970. WriteObject_XmlSchemaSimpleTypeList((System.Xml.Schema.XmlSchemaSimpleTypeList)ob, element, namesp, isNullable, true, writeWrappingElem);
  7971. return;
  7972. }
  7973. else if (type == typeof(System.Xml.Schema.XmlSchemaFacet)) {
  7974. WriteObject_XmlSchemaFacet((System.Xml.Schema.XmlSchemaFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7975. return;
  7976. }
  7977. else if (type == typeof(System.Xml.Schema.XmlSchemaPatternFacet)) {
  7978. WriteObject_XmlSchemaPatternFacet((System.Xml.Schema.XmlSchemaPatternFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7979. return;
  7980. }
  7981. else if (type == typeof(System.Xml.Schema.XmlSchemaWhiteSpaceFacet)) {
  7982. WriteObject_XmlSchemaWhiteSpaceFacet((System.Xml.Schema.XmlSchemaWhiteSpaceFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7983. return;
  7984. }
  7985. else if (type == typeof(System.Xml.Schema.XmlSchemaEnumerationFacet)) {
  7986. WriteObject_XmlSchemaEnumerationFacet((System.Xml.Schema.XmlSchemaEnumerationFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7987. return;
  7988. }
  7989. else if (type == typeof(System.Xml.Schema.XmlSchemaNumericFacet)) {
  7990. WriteObject_XmlSchemaNumericFacet((System.Xml.Schema.XmlSchemaNumericFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7991. return;
  7992. }
  7993. else if (type == typeof(System.Xml.Schema.XmlSchemaMaxLengthFacet)) {
  7994. WriteObject_XmlSchemaMaxLengthFacet((System.Xml.Schema.XmlSchemaMaxLengthFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7995. return;
  7996. }
  7997. else if (type == typeof(System.Xml.Schema.XmlSchemaMinLengthFacet)) {
  7998. WriteObject_XmlSchemaMinLengthFacet((System.Xml.Schema.XmlSchemaMinLengthFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  7999. return;
  8000. }
  8001. else if (type == typeof(System.Xml.Schema.XmlSchemaLengthFacet)) {
  8002. WriteObject_XmlSchemaLengthFacet((System.Xml.Schema.XmlSchemaLengthFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8003. return;
  8004. }
  8005. else if (type == typeof(System.Xml.Schema.XmlSchemaFractionDigitsFacet)) {
  8006. WriteObject_XmlSchemaFractionDigitsFacet((System.Xml.Schema.XmlSchemaFractionDigitsFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8007. return;
  8008. }
  8009. else if (type == typeof(System.Xml.Schema.XmlSchemaTotalDigitsFacet)) {
  8010. WriteObject_XmlSchemaTotalDigitsFacet((System.Xml.Schema.XmlSchemaTotalDigitsFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8011. return;
  8012. }
  8013. else if (type == typeof(System.Xml.Schema.XmlSchemaMaxInclusiveFacet)) {
  8014. WriteObject_XmlSchemaMaxInclusiveFacet((System.Xml.Schema.XmlSchemaMaxInclusiveFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8015. return;
  8016. }
  8017. else if (type == typeof(System.Xml.Schema.XmlSchemaMaxExclusiveFacet)) {
  8018. WriteObject_XmlSchemaMaxExclusiveFacet((System.Xml.Schema.XmlSchemaMaxExclusiveFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8019. return;
  8020. }
  8021. else if (type == typeof(System.Xml.Schema.XmlSchemaMinInclusiveFacet)) {
  8022. WriteObject_XmlSchemaMinInclusiveFacet((System.Xml.Schema.XmlSchemaMinInclusiveFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8023. return;
  8024. }
  8025. else if (type == typeof(System.Xml.Schema.XmlSchemaMinExclusiveFacet)) {
  8026. WriteObject_XmlSchemaMinExclusiveFacet((System.Xml.Schema.XmlSchemaMinExclusiveFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8027. return;
  8028. }
  8029. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeRestriction)) {
  8030. WriteObject_XmlSchemaSimpleTypeRestriction((System.Xml.Schema.XmlSchemaSimpleTypeRestriction)ob, element, namesp, isNullable, true, writeWrappingElem);
  8031. return;
  8032. }
  8033. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleType)) {
  8034. WriteObject_XmlSchemaSimpleType((System.Xml.Schema.XmlSchemaSimpleType)ob, element, namesp, isNullable, true, writeWrappingElem);
  8035. return;
  8036. }
  8037. else if (type == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
  8038. WriteObject_XmlSchemaAttribute((System.Xml.Schema.XmlSchemaAttribute)ob, element, namesp, isNullable, true, writeWrappingElem);
  8039. return;
  8040. }
  8041. else if (type == typeof(System.Xml.Schema.XmlSchemaAnyAttribute)) {
  8042. WriteObject_XmlSchemaAnyAttribute((System.Xml.Schema.XmlSchemaAnyAttribute)ob, element, namesp, isNullable, true, writeWrappingElem);
  8043. return;
  8044. }
  8045. else if (type == typeof(System.Xml.Schema.XmlSchemaAttributeGroup)) {
  8046. WriteObject_XmlSchemaAttributeGroup((System.Xml.Schema.XmlSchemaAttributeGroup)ob, element, namesp, isNullable, true, writeWrappingElem);
  8047. return;
  8048. }
  8049. else if (type == typeof(System.Xml.Schema.XmlSchemaParticle)) {
  8050. WriteObject_XmlSchemaParticle((System.Xml.Schema.XmlSchemaParticle)ob, element, namesp, isNullable, true, writeWrappingElem);
  8051. return;
  8052. }
  8053. else if (type == typeof(System.Xml.Schema.XmlSchemaAny)) {
  8054. WriteObject_XmlSchemaAny((System.Xml.Schema.XmlSchemaAny)ob, element, namesp, isNullable, true, writeWrappingElem);
  8055. return;
  8056. }
  8057. else if (type == typeof(System.Xml.Schema.XmlSchemaGroupRef)) {
  8058. WriteObject_XmlSchemaGroupRef((System.Xml.Schema.XmlSchemaGroupRef)ob, element, namesp, isNullable, true, writeWrappingElem);
  8059. return;
  8060. }
  8061. else if (type == typeof(System.Xml.Schema.XmlSchemaGroupBase)) {
  8062. WriteObject_XmlSchemaGroupBase((System.Xml.Schema.XmlSchemaGroupBase)ob, element, namesp, isNullable, true, writeWrappingElem);
  8063. return;
  8064. }
  8065. else if (type == typeof(System.Xml.Schema.XmlSchemaAll)) {
  8066. WriteObject_XmlSchemaAll((System.Xml.Schema.XmlSchemaAll)ob, element, namesp, isNullable, true, writeWrappingElem);
  8067. return;
  8068. }
  8069. else if (type == typeof(System.Xml.Schema.XmlSchemaContent)) {
  8070. WriteObject_XmlSchemaContent((System.Xml.Schema.XmlSchemaContent)ob, element, namesp, isNullable, true, writeWrappingElem);
  8071. return;
  8072. }
  8073. else if (type == typeof(System.Xml.Schema.XmlSchemaComplexContentExtension)) {
  8074. WriteObject_XmlSchemaComplexContentExtension((System.Xml.Schema.XmlSchemaComplexContentExtension)ob, element, namesp, isNullable, true, writeWrappingElem);
  8075. return;
  8076. }
  8077. else if (type == typeof(System.Xml.Schema.XmlSchemaComplexContentRestriction)) {
  8078. WriteObject_XmlSchemaComplexContentRestriction((System.Xml.Schema.XmlSchemaComplexContentRestriction)ob, element, namesp, isNullable, true, writeWrappingElem);
  8079. return;
  8080. }
  8081. else if (type == typeof(System.Xml.Schema.XmlSchemaContentModel)) {
  8082. WriteObject_XmlSchemaContentModel((System.Xml.Schema.XmlSchemaContentModel)ob, element, namesp, isNullable, true, writeWrappingElem);
  8083. return;
  8084. }
  8085. else if (type == typeof(System.Xml.Schema.XmlSchemaComplexContent)) {
  8086. WriteObject_XmlSchemaComplexContent((System.Xml.Schema.XmlSchemaComplexContent)ob, element, namesp, isNullable, true, writeWrappingElem);
  8087. return;
  8088. }
  8089. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleContentExtension)) {
  8090. WriteObject_XmlSchemaSimpleContentExtension((System.Xml.Schema.XmlSchemaSimpleContentExtension)ob, element, namesp, isNullable, true, writeWrappingElem);
  8091. return;
  8092. }
  8093. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleContentRestriction)) {
  8094. WriteObject_XmlSchemaSimpleContentRestriction((System.Xml.Schema.XmlSchemaSimpleContentRestriction)ob, element, namesp, isNullable, true, writeWrappingElem);
  8095. return;
  8096. }
  8097. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleContent)) {
  8098. WriteObject_XmlSchemaSimpleContent((System.Xml.Schema.XmlSchemaSimpleContent)ob, element, namesp, isNullable, true, writeWrappingElem);
  8099. return;
  8100. }
  8101. else if (type == typeof(System.Xml.Schema.XmlSchemaComplexType)) {
  8102. WriteObject_XmlSchemaComplexType((System.Xml.Schema.XmlSchemaComplexType)ob, element, namesp, isNullable, true, writeWrappingElem);
  8103. return;
  8104. }
  8105. else if (type == typeof(System.Xml.Schema.XmlSchemaXPath)) {
  8106. WriteObject_XmlSchemaXPath((System.Xml.Schema.XmlSchemaXPath)ob, element, namesp, isNullable, true, writeWrappingElem);
  8107. return;
  8108. }
  8109. else if (type == typeof(System.Xml.Schema.XmlSchemaIdentityConstraint)) {
  8110. WriteObject_XmlSchemaIdentityConstraint((System.Xml.Schema.XmlSchemaIdentityConstraint)ob, element, namesp, isNullable, true, writeWrappingElem);
  8111. return;
  8112. }
  8113. else if (type == typeof(System.Xml.Schema.XmlSchemaKeyref)) {
  8114. WriteObject_XmlSchemaKeyref((System.Xml.Schema.XmlSchemaKeyref)ob, element, namesp, isNullable, true, writeWrappingElem);
  8115. return;
  8116. }
  8117. else if (type == typeof(System.Xml.Schema.XmlSchemaKey)) {
  8118. WriteObject_XmlSchemaKey((System.Xml.Schema.XmlSchemaKey)ob, element, namesp, isNullable, true, writeWrappingElem);
  8119. return;
  8120. }
  8121. else if (type == typeof(System.Xml.Schema.XmlSchemaUnique)) {
  8122. WriteObject_XmlSchemaUnique((System.Xml.Schema.XmlSchemaUnique)ob, element, namesp, isNullable, true, writeWrappingElem);
  8123. return;
  8124. }
  8125. else if (type == typeof(System.Xml.Schema.XmlSchemaElement)) {
  8126. WriteObject_XmlSchemaElement((System.Xml.Schema.XmlSchemaElement)ob, element, namesp, isNullable, true, writeWrappingElem);
  8127. return;
  8128. }
  8129. else if (type == typeof(System.Xml.Schema.XmlSchemaChoice)) {
  8130. WriteObject_XmlSchemaChoice((System.Xml.Schema.XmlSchemaChoice)ob, element, namesp, isNullable, true, writeWrappingElem);
  8131. return;
  8132. }
  8133. else if (type == typeof(System.Xml.Schema.XmlSchemaSequence)) {
  8134. WriteObject_XmlSchemaSequence((System.Xml.Schema.XmlSchemaSequence)ob, element, namesp, isNullable, true, writeWrappingElem);
  8135. return;
  8136. }
  8137. else if (type == typeof(System.Xml.Schema.XmlSchemaGroup)) {
  8138. WriteObject_XmlSchemaGroup((System.Xml.Schema.XmlSchemaGroup)ob, element, namesp, isNullable, true, writeWrappingElem);
  8139. return;
  8140. }
  8141. else if (type == typeof(System.Xml.Schema.XmlSchemaNotation)) {
  8142. WriteObject_XmlSchemaNotation((System.Xml.Schema.XmlSchemaNotation)ob, element, namesp, isNullable, true, writeWrappingElem);
  8143. return;
  8144. }
  8145. else {
  8146. throw CreateUnknownTypeException (ob);
  8147. }
  8148. if (writeWrappingElem) {
  8149. WriteStartElement (element, namesp, ob);
  8150. }
  8151. if (needType) WriteXsiType("XmlSchemaAnnotated", "http://www.w3.org/2001/XMLSchema");
  8152. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  8153. ICollection o245 = ob.@UnhandledAttributes;
  8154. if (o245 != null) {
  8155. foreach (XmlAttribute o246 in o245)
  8156. if (o246.NamespaceURI != xmlNamespace)
  8157. WriteXmlAttribute (o246, ob);
  8158. }
  8159. WriteAttribute ("id", "", ob.@Id);
  8160. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8161. if (writeWrappingElem) WriteEndElement (ob);
  8162. }
  8163. void WriteObject_XmlSchemaAttributeGroupRef (System.Xml.Schema.XmlSchemaAttributeGroupRef ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  8164. {
  8165. if (((object)ob) == null)
  8166. {
  8167. if (isNullable)
  8168. WriteNullTagLiteral(element, namesp);
  8169. return;
  8170. }
  8171. System.Type type = ob.GetType ();
  8172. if (type == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef))
  8173. { }
  8174. else {
  8175. throw CreateUnknownTypeException (ob);
  8176. }
  8177. if (writeWrappingElem) {
  8178. WriteStartElement (element, namesp, ob);
  8179. }
  8180. if (needType) WriteXsiType("XmlSchemaAttributeGroupRef", "http://www.w3.org/2001/XMLSchema");
  8181. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  8182. ICollection o247 = ob.@UnhandledAttributes;
  8183. if (o247 != null) {
  8184. foreach (XmlAttribute o248 in o247)
  8185. if (o248.NamespaceURI != xmlNamespace)
  8186. WriteXmlAttribute (o248, ob);
  8187. }
  8188. WriteAttribute ("id", "", ob.@Id);
  8189. WriteAttribute ("ref", "", FromXmlQualifiedName (ob.@RefName));
  8190. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8191. if (writeWrappingElem) WriteEndElement (ob);
  8192. }
  8193. void WriteObject_XmlSchemaType (System.Xml.Schema.XmlSchemaType ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  8194. {
  8195. if (((object)ob) == null)
  8196. {
  8197. if (isNullable)
  8198. WriteNullTagLiteral(element, namesp);
  8199. return;
  8200. }
  8201. System.Type type = ob.GetType ();
  8202. if (type == typeof(System.Xml.Schema.XmlSchemaType))
  8203. { }
  8204. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleType)) {
  8205. WriteObject_XmlSchemaSimpleType((System.Xml.Schema.XmlSchemaSimpleType)ob, element, namesp, isNullable, true, writeWrappingElem);
  8206. return;
  8207. }
  8208. else if (type == typeof(System.Xml.Schema.XmlSchemaComplexType)) {
  8209. WriteObject_XmlSchemaComplexType((System.Xml.Schema.XmlSchemaComplexType)ob, element, namesp, isNullable, true, writeWrappingElem);
  8210. return;
  8211. }
  8212. else {
  8213. throw CreateUnknownTypeException (ob);
  8214. }
  8215. if (writeWrappingElem) {
  8216. WriteStartElement (element, namesp, ob);
  8217. }
  8218. if (needType) WriteXsiType("XmlSchemaType", "http://www.w3.org/2001/XMLSchema");
  8219. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  8220. ICollection o249 = ob.@UnhandledAttributes;
  8221. if (o249 != null) {
  8222. foreach (XmlAttribute o250 in o249)
  8223. if (o250.NamespaceURI != xmlNamespace)
  8224. WriteXmlAttribute (o250, ob);
  8225. }
  8226. WriteAttribute ("id", "", ob.@Id);
  8227. WriteAttribute ("name", "", ob.@Name);
  8228. if (ob.@Final != ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None)) {
  8229. WriteAttribute ("final", "", GetEnumValue_XmlSchemaDerivationMethod (ob.@Final));
  8230. }
  8231. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8232. if (writeWrappingElem) WriteEndElement (ob);
  8233. }
  8234. void WriteObject_ArrayOfQName (System.Xml.XmlQualifiedName[] ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  8235. {
  8236. if (((object)ob) == null)
  8237. {
  8238. if (isNullable)
  8239. WriteNullTagLiteral(element, namesp);
  8240. return;
  8241. }
  8242. System.Type type = ob.GetType ();
  8243. if (type == typeof(System.Xml.XmlQualifiedName[]))
  8244. { }
  8245. else {
  8246. throw CreateUnknownTypeException (ob);
  8247. }
  8248. if (writeWrappingElem) {
  8249. WriteStartElement (element, namesp, ob);
  8250. }
  8251. if (needType) WriteXsiType("ArrayOfQName", "");
  8252. for (int n251 = 0; n251 < ob.Length; n251++) {
  8253. WriteElementQualifiedName ("QName", "", ob[n251]);
  8254. }
  8255. if (writeWrappingElem) WriteEndElement (ob);
  8256. }
  8257. void WriteObject_XmlSchemaSimpleTypeContent (System.Xml.Schema.XmlSchemaSimpleTypeContent ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  8258. {
  8259. if (((object)ob) == null)
  8260. {
  8261. if (isNullable)
  8262. WriteNullTagLiteral(element, namesp);
  8263. return;
  8264. }
  8265. System.Type type = ob.GetType ();
  8266. if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeContent))
  8267. { }
  8268. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeUnion)) {
  8269. WriteObject_XmlSchemaSimpleTypeUnion((System.Xml.Schema.XmlSchemaSimpleTypeUnion)ob, element, namesp, isNullable, true, writeWrappingElem);
  8270. return;
  8271. }
  8272. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeList)) {
  8273. WriteObject_XmlSchemaSimpleTypeList((System.Xml.Schema.XmlSchemaSimpleTypeList)ob, element, namesp, isNullable, true, writeWrappingElem);
  8274. return;
  8275. }
  8276. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeRestriction)) {
  8277. WriteObject_XmlSchemaSimpleTypeRestriction((System.Xml.Schema.XmlSchemaSimpleTypeRestriction)ob, element, namesp, isNullable, true, writeWrappingElem);
  8278. return;
  8279. }
  8280. else {
  8281. throw CreateUnknownTypeException (ob);
  8282. }
  8283. if (writeWrappingElem) {
  8284. WriteStartElement (element, namesp, ob);
  8285. }
  8286. if (needType) WriteXsiType("XmlSchemaSimpleTypeContent", "http://www.w3.org/2001/XMLSchema");
  8287. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  8288. ICollection o252 = ob.@UnhandledAttributes;
  8289. if (o252 != null) {
  8290. foreach (XmlAttribute o253 in o252)
  8291. if (o253.NamespaceURI != xmlNamespace)
  8292. WriteXmlAttribute (o253, ob);
  8293. }
  8294. WriteAttribute ("id", "", ob.@Id);
  8295. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8296. if (writeWrappingElem) WriteEndElement (ob);
  8297. }
  8298. void WriteObject_XmlSchemaSimpleTypeUnion (System.Xml.Schema.XmlSchemaSimpleTypeUnion ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  8299. {
  8300. if (((object)ob) == null)
  8301. {
  8302. if (isNullable)
  8303. WriteNullTagLiteral(element, namesp);
  8304. return;
  8305. }
  8306. System.Type type = ob.GetType ();
  8307. if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeUnion))
  8308. { }
  8309. else {
  8310. throw CreateUnknownTypeException (ob);
  8311. }
  8312. if (writeWrappingElem) {
  8313. WriteStartElement (element, namesp, ob);
  8314. }
  8315. if (needType) WriteXsiType("XmlSchemaSimpleTypeUnion", "http://www.w3.org/2001/XMLSchema");
  8316. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  8317. ICollection o254 = ob.@UnhandledAttributes;
  8318. if (o254 != null) {
  8319. foreach (XmlAttribute o255 in o254)
  8320. if (o255.NamespaceURI != xmlNamespace)
  8321. WriteXmlAttribute (o255, ob);
  8322. }
  8323. WriteAttribute ("id", "", ob.@Id);
  8324. string s256 = null;
  8325. if (ob.@MemberTypes != null) {
  8326. System.Text.StringBuilder s257 = new System.Text.StringBuilder();
  8327. for (int n258 = 0; n258 < [email protected]; n258++) {
  8328. s257.Append (FromXmlQualifiedName (ob.@MemberTypes[n258])).Append (" ");
  8329. }
  8330. s256 = s257.ToString ().Trim ();
  8331. }
  8332. WriteAttribute ("memberTypes", "", s256);
  8333. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8334. if (ob.@BaseTypes != null) {
  8335. for (int n259 = 0; n259 < [email protected]; n259++) {
  8336. WriteObject_XmlSchemaSimpleType (((System.Xml.Schema.XmlSchemaSimpleType) ob.@BaseTypes[n259]), "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8337. }
  8338. }
  8339. if (writeWrappingElem) WriteEndElement (ob);
  8340. }
  8341. void WriteObject_XmlSchemaSimpleTypeList (System.Xml.Schema.XmlSchemaSimpleTypeList ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  8342. {
  8343. if (((object)ob) == null)
  8344. {
  8345. if (isNullable)
  8346. WriteNullTagLiteral(element, namesp);
  8347. return;
  8348. }
  8349. System.Type type = ob.GetType ();
  8350. if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeList))
  8351. { }
  8352. else {
  8353. throw CreateUnknownTypeException (ob);
  8354. }
  8355. if (writeWrappingElem) {
  8356. WriteStartElement (element, namesp, ob);
  8357. }
  8358. if (needType) WriteXsiType("XmlSchemaSimpleTypeList", "http://www.w3.org/2001/XMLSchema");
  8359. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  8360. ICollection o260 = ob.@UnhandledAttributes;
  8361. if (o260 != null) {
  8362. foreach (XmlAttribute o261 in o260)
  8363. if (o261.NamespaceURI != xmlNamespace)
  8364. WriteXmlAttribute (o261, ob);
  8365. }
  8366. WriteAttribute ("id", "", ob.@Id);
  8367. WriteAttribute ("itemType", "", FromXmlQualifiedName (ob.@ItemTypeName));
  8368. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8369. WriteObject_XmlSchemaSimpleType (ob.@ItemType, "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8370. if (writeWrappingElem) WriteEndElement (ob);
  8371. }
  8372. void WriteObject_XmlSchemaFacet (System.Xml.Schema.XmlSchemaFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  8373. {
  8374. if (((object)ob) == null)
  8375. {
  8376. if (isNullable)
  8377. WriteNullTagLiteral(element, namesp);
  8378. return;
  8379. }
  8380. System.Type type = ob.GetType ();
  8381. if (type == typeof(System.Xml.Schema.XmlSchemaFacet))
  8382. { }
  8383. else if (type == typeof(System.Xml.Schema.XmlSchemaPatternFacet)) {
  8384. WriteObject_XmlSchemaPatternFacet((System.Xml.Schema.XmlSchemaPatternFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8385. return;
  8386. }
  8387. else if (type == typeof(System.Xml.Schema.XmlSchemaWhiteSpaceFacet)) {
  8388. WriteObject_XmlSchemaWhiteSpaceFacet((System.Xml.Schema.XmlSchemaWhiteSpaceFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8389. return;
  8390. }
  8391. else if (type == typeof(System.Xml.Schema.XmlSchemaEnumerationFacet)) {
  8392. WriteObject_XmlSchemaEnumerationFacet((System.Xml.Schema.XmlSchemaEnumerationFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8393. return;
  8394. }
  8395. else if (type == typeof(System.Xml.Schema.XmlSchemaNumericFacet)) {
  8396. WriteObject_XmlSchemaNumericFacet((System.Xml.Schema.XmlSchemaNumericFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8397. return;
  8398. }
  8399. else if (type == typeof(System.Xml.Schema.XmlSchemaMaxLengthFacet)) {
  8400. WriteObject_XmlSchemaMaxLengthFacet((System.Xml.Schema.XmlSchemaMaxLengthFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8401. return;
  8402. }
  8403. else if (type == typeof(System.Xml.Schema.XmlSchemaMinLengthFacet)) {
  8404. WriteObject_XmlSchemaMinLengthFacet((System.Xml.Schema.XmlSchemaMinLengthFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8405. return;
  8406. }
  8407. else if (type == typeof(System.Xml.Schema.XmlSchemaLengthFacet)) {
  8408. WriteObject_XmlSchemaLengthFacet((System.Xml.Schema.XmlSchemaLengthFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8409. return;
  8410. }
  8411. else if (type == typeof(System.Xml.Schema.XmlSchemaFractionDigitsFacet)) {
  8412. WriteObject_XmlSchemaFractionDigitsFacet((System.Xml.Schema.XmlSchemaFractionDigitsFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8413. return;
  8414. }
  8415. else if (type == typeof(System.Xml.Schema.XmlSchemaTotalDigitsFacet)) {
  8416. WriteObject_XmlSchemaTotalDigitsFacet((System.Xml.Schema.XmlSchemaTotalDigitsFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8417. return;
  8418. }
  8419. else if (type == typeof(System.Xml.Schema.XmlSchemaMaxInclusiveFacet)) {
  8420. WriteObject_XmlSchemaMaxInclusiveFacet((System.Xml.Schema.XmlSchemaMaxInclusiveFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8421. return;
  8422. }
  8423. else if (type == typeof(System.Xml.Schema.XmlSchemaMaxExclusiveFacet)) {
  8424. WriteObject_XmlSchemaMaxExclusiveFacet((System.Xml.Schema.XmlSchemaMaxExclusiveFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8425. return;
  8426. }
  8427. else if (type == typeof(System.Xml.Schema.XmlSchemaMinInclusiveFacet)) {
  8428. WriteObject_XmlSchemaMinInclusiveFacet((System.Xml.Schema.XmlSchemaMinInclusiveFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8429. return;
  8430. }
  8431. else if (type == typeof(System.Xml.Schema.XmlSchemaMinExclusiveFacet)) {
  8432. WriteObject_XmlSchemaMinExclusiveFacet((System.Xml.Schema.XmlSchemaMinExclusiveFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8433. return;
  8434. }
  8435. else {
  8436. throw CreateUnknownTypeException (ob);
  8437. }
  8438. if (writeWrappingElem) {
  8439. WriteStartElement (element, namesp, ob);
  8440. }
  8441. if (needType) WriteXsiType("XmlSchemaFacet", "http://www.w3.org/2001/XMLSchema");
  8442. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  8443. ICollection o262 = ob.@UnhandledAttributes;
  8444. if (o262 != null) {
  8445. foreach (XmlAttribute o263 in o262)
  8446. if (o263.NamespaceURI != xmlNamespace)
  8447. WriteXmlAttribute (o263, ob);
  8448. }
  8449. WriteAttribute ("id", "", ob.@Id);
  8450. WriteAttribute ("value", "", ob.@Value);
  8451. if (ob.@IsFixed != false) {
  8452. WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
  8453. }
  8454. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8455. if (writeWrappingElem) WriteEndElement (ob);
  8456. }
  8457. void WriteObject_XmlSchemaPatternFacet (System.Xml.Schema.XmlSchemaPatternFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  8458. {
  8459. if (((object)ob) == null)
  8460. {
  8461. if (isNullable)
  8462. WriteNullTagLiteral(element, namesp);
  8463. return;
  8464. }
  8465. System.Type type = ob.GetType ();
  8466. if (type == typeof(System.Xml.Schema.XmlSchemaPatternFacet))
  8467. { }
  8468. else {
  8469. throw CreateUnknownTypeException (ob);
  8470. }
  8471. if (writeWrappingElem) {
  8472. WriteStartElement (element, namesp, ob);
  8473. }
  8474. if (needType) WriteXsiType("XmlSchemaPatternFacet", "http://www.w3.org/2001/XMLSchema");
  8475. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  8476. ICollection o264 = ob.@UnhandledAttributes;
  8477. if (o264 != null) {
  8478. foreach (XmlAttribute o265 in o264)
  8479. if (o265.NamespaceURI != xmlNamespace)
  8480. WriteXmlAttribute (o265, ob);
  8481. }
  8482. WriteAttribute ("id", "", ob.@Id);
  8483. WriteAttribute ("value", "", ob.@Value);
  8484. if (ob.@IsFixed != false) {
  8485. WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
  8486. }
  8487. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8488. if (writeWrappingElem) WriteEndElement (ob);
  8489. }
  8490. void WriteObject_XmlSchemaWhiteSpaceFacet (System.Xml.Schema.XmlSchemaWhiteSpaceFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  8491. {
  8492. if (((object)ob) == null)
  8493. {
  8494. if (isNullable)
  8495. WriteNullTagLiteral(element, namesp);
  8496. return;
  8497. }
  8498. System.Type type = ob.GetType ();
  8499. if (type == typeof(System.Xml.Schema.XmlSchemaWhiteSpaceFacet))
  8500. { }
  8501. else {
  8502. throw CreateUnknownTypeException (ob);
  8503. }
  8504. if (writeWrappingElem) {
  8505. WriteStartElement (element, namesp, ob);
  8506. }
  8507. if (needType) WriteXsiType("XmlSchemaWhiteSpaceFacet", "http://www.w3.org/2001/XMLSchema");
  8508. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  8509. ICollection o266 = ob.@UnhandledAttributes;
  8510. if (o266 != null) {
  8511. foreach (XmlAttribute o267 in o266)
  8512. if (o267.NamespaceURI != xmlNamespace)
  8513. WriteXmlAttribute (o267, ob);
  8514. }
  8515. WriteAttribute ("id", "", ob.@Id);
  8516. WriteAttribute ("value", "", ob.@Value);
  8517. if (ob.@IsFixed != false) {
  8518. WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
  8519. }
  8520. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8521. if (writeWrappingElem) WriteEndElement (ob);
  8522. }
  8523. void WriteObject_XmlSchemaEnumerationFacet (System.Xml.Schema.XmlSchemaEnumerationFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  8524. {
  8525. if (((object)ob) == null)
  8526. {
  8527. if (isNullable)
  8528. WriteNullTagLiteral(element, namesp);
  8529. return;
  8530. }
  8531. System.Type type = ob.GetType ();
  8532. if (type == typeof(System.Xml.Schema.XmlSchemaEnumerationFacet))
  8533. { }
  8534. else {
  8535. throw CreateUnknownTypeException (ob);
  8536. }
  8537. if (writeWrappingElem) {
  8538. WriteStartElement (element, namesp, ob);
  8539. }
  8540. if (needType) WriteXsiType("XmlSchemaEnumerationFacet", "http://www.w3.org/2001/XMLSchema");
  8541. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  8542. ICollection o268 = ob.@UnhandledAttributes;
  8543. if (o268 != null) {
  8544. foreach (XmlAttribute o269 in o268)
  8545. if (o269.NamespaceURI != xmlNamespace)
  8546. WriteXmlAttribute (o269, ob);
  8547. }
  8548. WriteAttribute ("id", "", ob.@Id);
  8549. WriteAttribute ("value", "", ob.@Value);
  8550. if (ob.@IsFixed != false) {
  8551. WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
  8552. }
  8553. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8554. if (writeWrappingElem) WriteEndElement (ob);
  8555. }
  8556. void WriteObject_XmlSchemaNumericFacet (System.Xml.Schema.XmlSchemaNumericFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  8557. {
  8558. if (((object)ob) == null)
  8559. {
  8560. if (isNullable)
  8561. WriteNullTagLiteral(element, namesp);
  8562. return;
  8563. }
  8564. System.Type type = ob.GetType ();
  8565. if (type == typeof(System.Xml.Schema.XmlSchemaNumericFacet))
  8566. { }
  8567. else if (type == typeof(System.Xml.Schema.XmlSchemaMaxLengthFacet)) {
  8568. WriteObject_XmlSchemaMaxLengthFacet((System.Xml.Schema.XmlSchemaMaxLengthFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8569. return;
  8570. }
  8571. else if (type == typeof(System.Xml.Schema.XmlSchemaMinLengthFacet)) {
  8572. WriteObject_XmlSchemaMinLengthFacet((System.Xml.Schema.XmlSchemaMinLengthFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8573. return;
  8574. }
  8575. else if (type == typeof(System.Xml.Schema.XmlSchemaLengthFacet)) {
  8576. WriteObject_XmlSchemaLengthFacet((System.Xml.Schema.XmlSchemaLengthFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8577. return;
  8578. }
  8579. else if (type == typeof(System.Xml.Schema.XmlSchemaFractionDigitsFacet)) {
  8580. WriteObject_XmlSchemaFractionDigitsFacet((System.Xml.Schema.XmlSchemaFractionDigitsFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8581. return;
  8582. }
  8583. else if (type == typeof(System.Xml.Schema.XmlSchemaTotalDigitsFacet)) {
  8584. WriteObject_XmlSchemaTotalDigitsFacet((System.Xml.Schema.XmlSchemaTotalDigitsFacet)ob, element, namesp, isNullable, true, writeWrappingElem);
  8585. return;
  8586. }
  8587. else {
  8588. throw CreateUnknownTypeException (ob);
  8589. }
  8590. if (writeWrappingElem) {
  8591. WriteStartElement (element, namesp, ob);
  8592. }
  8593. if (needType) WriteXsiType("XmlSchemaNumericFacet", "http://www.w3.org/2001/XMLSchema");
  8594. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  8595. ICollection o270 = ob.@UnhandledAttributes;
  8596. if (o270 != null) {
  8597. foreach (XmlAttribute o271 in o270)
  8598. if (o271.NamespaceURI != xmlNamespace)
  8599. WriteXmlAttribute (o271, ob);
  8600. }
  8601. WriteAttribute ("id", "", ob.@Id);
  8602. WriteAttribute ("value", "", ob.@Value);
  8603. if (ob.@IsFixed != false) {
  8604. WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
  8605. }
  8606. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8607. if (writeWrappingElem) WriteEndElement (ob);
  8608. }
  8609. void WriteObject_XmlSchemaMaxLengthFacet (System.Xml.Schema.XmlSchemaMaxLengthFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  8610. {
  8611. if (((object)ob) == null)
  8612. {
  8613. if (isNullable)
  8614. WriteNullTagLiteral(element, namesp);
  8615. return;
  8616. }
  8617. System.Type type = ob.GetType ();
  8618. if (type == typeof(System.Xml.Schema.XmlSchemaMaxLengthFacet))
  8619. { }
  8620. else {
  8621. throw CreateUnknownTypeException (ob);
  8622. }
  8623. if (writeWrappingElem) {
  8624. WriteStartElement (element, namesp, ob);
  8625. }
  8626. if (needType) WriteXsiType("XmlSchemaMaxLengthFacet", "http://www.w3.org/2001/XMLSchema");
  8627. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  8628. ICollection o272 = ob.@UnhandledAttributes;
  8629. if (o272 != null) {
  8630. foreach (XmlAttribute o273 in o272)
  8631. if (o273.NamespaceURI != xmlNamespace)
  8632. WriteXmlAttribute (o273, ob);
  8633. }
  8634. WriteAttribute ("id", "", ob.@Id);
  8635. WriteAttribute ("value", "", ob.@Value);
  8636. if (ob.@IsFixed != false) {
  8637. WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
  8638. }
  8639. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8640. if (writeWrappingElem) WriteEndElement (ob);
  8641. }
  8642. void WriteObject_XmlSchemaMinLengthFacet (System.Xml.Schema.XmlSchemaMinLengthFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  8643. {
  8644. if (((object)ob) == null)
  8645. {
  8646. if (isNullable)
  8647. WriteNullTagLiteral(element, namesp);
  8648. return;
  8649. }
  8650. System.Type type = ob.GetType ();
  8651. if (type == typeof(System.Xml.Schema.XmlSchemaMinLengthFacet))
  8652. { }
  8653. else {
  8654. throw CreateUnknownTypeException (ob);
  8655. }
  8656. if (writeWrappingElem) {
  8657. WriteStartElement (element, namesp, ob);
  8658. }
  8659. if (needType) WriteXsiType("XmlSchemaMinLengthFacet", "http://www.w3.org/2001/XMLSchema");
  8660. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  8661. ICollection o274 = ob.@UnhandledAttributes;
  8662. if (o274 != null) {
  8663. foreach (XmlAttribute o275 in o274)
  8664. if (o275.NamespaceURI != xmlNamespace)
  8665. WriteXmlAttribute (o275, ob);
  8666. }
  8667. WriteAttribute ("id", "", ob.@Id);
  8668. WriteAttribute ("value", "", ob.@Value);
  8669. if (ob.@IsFixed != false) {
  8670. WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
  8671. }
  8672. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8673. if (writeWrappingElem) WriteEndElement (ob);
  8674. }
  8675. void WriteObject_XmlSchemaLengthFacet (System.Xml.Schema.XmlSchemaLengthFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  8676. {
  8677. if (((object)ob) == null)
  8678. {
  8679. if (isNullable)
  8680. WriteNullTagLiteral(element, namesp);
  8681. return;
  8682. }
  8683. System.Type type = ob.GetType ();
  8684. if (type == typeof(System.Xml.Schema.XmlSchemaLengthFacet))
  8685. { }
  8686. else {
  8687. throw CreateUnknownTypeException (ob);
  8688. }
  8689. if (writeWrappingElem) {
  8690. WriteStartElement (element, namesp, ob);
  8691. }
  8692. if (needType) WriteXsiType("XmlSchemaLengthFacet", "http://www.w3.org/2001/XMLSchema");
  8693. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  8694. ICollection o276 = ob.@UnhandledAttributes;
  8695. if (o276 != null) {
  8696. foreach (XmlAttribute o277 in o276)
  8697. if (o277.NamespaceURI != xmlNamespace)
  8698. WriteXmlAttribute (o277, ob);
  8699. }
  8700. WriteAttribute ("id", "", ob.@Id);
  8701. WriteAttribute ("value", "", ob.@Value);
  8702. if (ob.@IsFixed != false) {
  8703. WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
  8704. }
  8705. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8706. if (writeWrappingElem) WriteEndElement (ob);
  8707. }
  8708. void WriteObject_XmlSchemaFractionDigitsFacet (System.Xml.Schema.XmlSchemaFractionDigitsFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  8709. {
  8710. if (((object)ob) == null)
  8711. {
  8712. if (isNullable)
  8713. WriteNullTagLiteral(element, namesp);
  8714. return;
  8715. }
  8716. System.Type type = ob.GetType ();
  8717. if (type == typeof(System.Xml.Schema.XmlSchemaFractionDigitsFacet))
  8718. { }
  8719. else {
  8720. throw CreateUnknownTypeException (ob);
  8721. }
  8722. if (writeWrappingElem) {
  8723. WriteStartElement (element, namesp, ob);
  8724. }
  8725. if (needType) WriteXsiType("XmlSchemaFractionDigitsFacet", "http://www.w3.org/2001/XMLSchema");
  8726. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  8727. ICollection o278 = ob.@UnhandledAttributes;
  8728. if (o278 != null) {
  8729. foreach (XmlAttribute o279 in o278)
  8730. if (o279.NamespaceURI != xmlNamespace)
  8731. WriteXmlAttribute (o279, ob);
  8732. }
  8733. WriteAttribute ("id", "", ob.@Id);
  8734. WriteAttribute ("value", "", ob.@Value);
  8735. if (ob.@IsFixed != false) {
  8736. WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
  8737. }
  8738. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8739. if (writeWrappingElem) WriteEndElement (ob);
  8740. }
  8741. void WriteObject_XmlSchemaTotalDigitsFacet (System.Xml.Schema.XmlSchemaTotalDigitsFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  8742. {
  8743. if (((object)ob) == null)
  8744. {
  8745. if (isNullable)
  8746. WriteNullTagLiteral(element, namesp);
  8747. return;
  8748. }
  8749. System.Type type = ob.GetType ();
  8750. if (type == typeof(System.Xml.Schema.XmlSchemaTotalDigitsFacet))
  8751. { }
  8752. else {
  8753. throw CreateUnknownTypeException (ob);
  8754. }
  8755. if (writeWrappingElem) {
  8756. WriteStartElement (element, namesp, ob);
  8757. }
  8758. if (needType) WriteXsiType("XmlSchemaTotalDigitsFacet", "http://www.w3.org/2001/XMLSchema");
  8759. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  8760. ICollection o280 = ob.@UnhandledAttributes;
  8761. if (o280 != null) {
  8762. foreach (XmlAttribute o281 in o280)
  8763. if (o281.NamespaceURI != xmlNamespace)
  8764. WriteXmlAttribute (o281, ob);
  8765. }
  8766. WriteAttribute ("id", "", ob.@Id);
  8767. WriteAttribute ("value", "", ob.@Value);
  8768. if (ob.@IsFixed != false) {
  8769. WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
  8770. }
  8771. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8772. if (writeWrappingElem) WriteEndElement (ob);
  8773. }
  8774. void WriteObject_XmlSchemaMaxInclusiveFacet (System.Xml.Schema.XmlSchemaMaxInclusiveFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  8775. {
  8776. if (((object)ob) == null)
  8777. {
  8778. if (isNullable)
  8779. WriteNullTagLiteral(element, namesp);
  8780. return;
  8781. }
  8782. System.Type type = ob.GetType ();
  8783. if (type == typeof(System.Xml.Schema.XmlSchemaMaxInclusiveFacet))
  8784. { }
  8785. else {
  8786. throw CreateUnknownTypeException (ob);
  8787. }
  8788. if (writeWrappingElem) {
  8789. WriteStartElement (element, namesp, ob);
  8790. }
  8791. if (needType) WriteXsiType("XmlSchemaMaxInclusiveFacet", "http://www.w3.org/2001/XMLSchema");
  8792. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  8793. ICollection o282 = ob.@UnhandledAttributes;
  8794. if (o282 != null) {
  8795. foreach (XmlAttribute o283 in o282)
  8796. if (o283.NamespaceURI != xmlNamespace)
  8797. WriteXmlAttribute (o283, ob);
  8798. }
  8799. WriteAttribute ("id", "", ob.@Id);
  8800. WriteAttribute ("value", "", ob.@Value);
  8801. if (ob.@IsFixed != false) {
  8802. WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
  8803. }
  8804. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8805. if (writeWrappingElem) WriteEndElement (ob);
  8806. }
  8807. void WriteObject_XmlSchemaMaxExclusiveFacet (System.Xml.Schema.XmlSchemaMaxExclusiveFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  8808. {
  8809. if (((object)ob) == null)
  8810. {
  8811. if (isNullable)
  8812. WriteNullTagLiteral(element, namesp);
  8813. return;
  8814. }
  8815. System.Type type = ob.GetType ();
  8816. if (type == typeof(System.Xml.Schema.XmlSchemaMaxExclusiveFacet))
  8817. { }
  8818. else {
  8819. throw CreateUnknownTypeException (ob);
  8820. }
  8821. if (writeWrappingElem) {
  8822. WriteStartElement (element, namesp, ob);
  8823. }
  8824. if (needType) WriteXsiType("XmlSchemaMaxExclusiveFacet", "http://www.w3.org/2001/XMLSchema");
  8825. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  8826. ICollection o284 = ob.@UnhandledAttributes;
  8827. if (o284 != null) {
  8828. foreach (XmlAttribute o285 in o284)
  8829. if (o285.NamespaceURI != xmlNamespace)
  8830. WriteXmlAttribute (o285, ob);
  8831. }
  8832. WriteAttribute ("id", "", ob.@Id);
  8833. WriteAttribute ("value", "", ob.@Value);
  8834. if (ob.@IsFixed != false) {
  8835. WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
  8836. }
  8837. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8838. if (writeWrappingElem) WriteEndElement (ob);
  8839. }
  8840. void WriteObject_XmlSchemaMinInclusiveFacet (System.Xml.Schema.XmlSchemaMinInclusiveFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  8841. {
  8842. if (((object)ob) == null)
  8843. {
  8844. if (isNullable)
  8845. WriteNullTagLiteral(element, namesp);
  8846. return;
  8847. }
  8848. System.Type type = ob.GetType ();
  8849. if (type == typeof(System.Xml.Schema.XmlSchemaMinInclusiveFacet))
  8850. { }
  8851. else {
  8852. throw CreateUnknownTypeException (ob);
  8853. }
  8854. if (writeWrappingElem) {
  8855. WriteStartElement (element, namesp, ob);
  8856. }
  8857. if (needType) WriteXsiType("XmlSchemaMinInclusiveFacet", "http://www.w3.org/2001/XMLSchema");
  8858. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  8859. ICollection o286 = ob.@UnhandledAttributes;
  8860. if (o286 != null) {
  8861. foreach (XmlAttribute o287 in o286)
  8862. if (o287.NamespaceURI != xmlNamespace)
  8863. WriteXmlAttribute (o287, ob);
  8864. }
  8865. WriteAttribute ("id", "", ob.@Id);
  8866. WriteAttribute ("value", "", ob.@Value);
  8867. if (ob.@IsFixed != false) {
  8868. WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
  8869. }
  8870. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8871. if (writeWrappingElem) WriteEndElement (ob);
  8872. }
  8873. void WriteObject_XmlSchemaMinExclusiveFacet (System.Xml.Schema.XmlSchemaMinExclusiveFacet ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  8874. {
  8875. if (((object)ob) == null)
  8876. {
  8877. if (isNullable)
  8878. WriteNullTagLiteral(element, namesp);
  8879. return;
  8880. }
  8881. System.Type type = ob.GetType ();
  8882. if (type == typeof(System.Xml.Schema.XmlSchemaMinExclusiveFacet))
  8883. { }
  8884. else {
  8885. throw CreateUnknownTypeException (ob);
  8886. }
  8887. if (writeWrappingElem) {
  8888. WriteStartElement (element, namesp, ob);
  8889. }
  8890. if (needType) WriteXsiType("XmlSchemaMinExclusiveFacet", "http://www.w3.org/2001/XMLSchema");
  8891. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  8892. ICollection o288 = ob.@UnhandledAttributes;
  8893. if (o288 != null) {
  8894. foreach (XmlAttribute o289 in o288)
  8895. if (o289.NamespaceURI != xmlNamespace)
  8896. WriteXmlAttribute (o289, ob);
  8897. }
  8898. WriteAttribute ("id", "", ob.@Id);
  8899. WriteAttribute ("value", "", ob.@Value);
  8900. if (ob.@IsFixed != false) {
  8901. WriteAttribute ("fixed", "", (ob.@IsFixed?"true":"false"));
  8902. }
  8903. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8904. if (writeWrappingElem) WriteEndElement (ob);
  8905. }
  8906. void WriteObject_XmlSchemaSimpleTypeRestriction (System.Xml.Schema.XmlSchemaSimpleTypeRestriction ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  8907. {
  8908. if (((object)ob) == null)
  8909. {
  8910. if (isNullable)
  8911. WriteNullTagLiteral(element, namesp);
  8912. return;
  8913. }
  8914. System.Type type = ob.GetType ();
  8915. if (type == typeof(System.Xml.Schema.XmlSchemaSimpleTypeRestriction))
  8916. { }
  8917. else {
  8918. throw CreateUnknownTypeException (ob);
  8919. }
  8920. if (writeWrappingElem) {
  8921. WriteStartElement (element, namesp, ob);
  8922. }
  8923. if (needType) WriteXsiType("XmlSchemaSimpleTypeRestriction", "http://www.w3.org/2001/XMLSchema");
  8924. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  8925. ICollection o290 = ob.@UnhandledAttributes;
  8926. if (o290 != null) {
  8927. foreach (XmlAttribute o291 in o290)
  8928. if (o291.NamespaceURI != xmlNamespace)
  8929. WriteXmlAttribute (o291, ob);
  8930. }
  8931. WriteAttribute ("id", "", ob.@Id);
  8932. WriteAttribute ("base", "", FromXmlQualifiedName (ob.@BaseTypeName));
  8933. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8934. WriteObject_XmlSchemaSimpleType (ob.@BaseType, "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8935. if (ob.@Facets != null) {
  8936. for (int n292 = 0; n292 < [email protected]; n292++) {
  8937. if (((object)ob.@Facets[n292]) == null) { }
  8938. else if (ob.@Facets[n292].GetType() == typeof(System.Xml.Schema.XmlSchemaPatternFacet)) {
  8939. WriteObject_XmlSchemaPatternFacet (((System.Xml.Schema.XmlSchemaPatternFacet) ob.@Facets[n292]), "pattern", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8940. }
  8941. else if (ob.@Facets[n292].GetType() == typeof(System.Xml.Schema.XmlSchemaWhiteSpaceFacet)) {
  8942. WriteObject_XmlSchemaWhiteSpaceFacet (((System.Xml.Schema.XmlSchemaWhiteSpaceFacet) ob.@Facets[n292]), "whiteSpace", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8943. }
  8944. else if (ob.@Facets[n292].GetType() == typeof(System.Xml.Schema.XmlSchemaEnumerationFacet)) {
  8945. WriteObject_XmlSchemaEnumerationFacet (((System.Xml.Schema.XmlSchemaEnumerationFacet) ob.@Facets[n292]), "enumeration", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8946. }
  8947. else if (ob.@Facets[n292].GetType() == typeof(System.Xml.Schema.XmlSchemaMaxLengthFacet)) {
  8948. WriteObject_XmlSchemaMaxLengthFacet (((System.Xml.Schema.XmlSchemaMaxLengthFacet) ob.@Facets[n292]), "maxLength", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8949. }
  8950. else if (ob.@Facets[n292].GetType() == typeof(System.Xml.Schema.XmlSchemaMinLengthFacet)) {
  8951. WriteObject_XmlSchemaMinLengthFacet (((System.Xml.Schema.XmlSchemaMinLengthFacet) ob.@Facets[n292]), "minLength", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8952. }
  8953. else if (ob.@Facets[n292].GetType() == typeof(System.Xml.Schema.XmlSchemaLengthFacet)) {
  8954. WriteObject_XmlSchemaLengthFacet (((System.Xml.Schema.XmlSchemaLengthFacet) ob.@Facets[n292]), "length", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8955. }
  8956. else if (ob.@Facets[n292].GetType() == typeof(System.Xml.Schema.XmlSchemaFractionDigitsFacet)) {
  8957. WriteObject_XmlSchemaFractionDigitsFacet (((System.Xml.Schema.XmlSchemaFractionDigitsFacet) ob.@Facets[n292]), "fractionDigits", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8958. }
  8959. else if (ob.@Facets[n292].GetType() == typeof(System.Xml.Schema.XmlSchemaTotalDigitsFacet)) {
  8960. WriteObject_XmlSchemaTotalDigitsFacet (((System.Xml.Schema.XmlSchemaTotalDigitsFacet) ob.@Facets[n292]), "totalDigits", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8961. }
  8962. else if (ob.@Facets[n292].GetType() == typeof(System.Xml.Schema.XmlSchemaMaxInclusiveFacet)) {
  8963. WriteObject_XmlSchemaMaxInclusiveFacet (((System.Xml.Schema.XmlSchemaMaxInclusiveFacet) ob.@Facets[n292]), "maxInclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8964. }
  8965. else if (ob.@Facets[n292].GetType() == typeof(System.Xml.Schema.XmlSchemaMaxExclusiveFacet)) {
  8966. WriteObject_XmlSchemaMaxExclusiveFacet (((System.Xml.Schema.XmlSchemaMaxExclusiveFacet) ob.@Facets[n292]), "maxExclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8967. }
  8968. else if (ob.@Facets[n292].GetType() == typeof(System.Xml.Schema.XmlSchemaMinInclusiveFacet)) {
  8969. WriteObject_XmlSchemaMinInclusiveFacet (((System.Xml.Schema.XmlSchemaMinInclusiveFacet) ob.@Facets[n292]), "minInclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8970. }
  8971. else if (ob.@Facets[n292].GetType() == typeof(System.Xml.Schema.XmlSchemaMinExclusiveFacet)) {
  8972. WriteObject_XmlSchemaMinExclusiveFacet (((System.Xml.Schema.XmlSchemaMinExclusiveFacet) ob.@Facets[n292]), "minExclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
  8973. }
  8974. else throw CreateUnknownTypeException (ob.@Facets[n292]);
  8975. }
  8976. }
  8977. if (writeWrappingElem) WriteEndElement (ob);
  8978. }
  8979. void WriteObject_XmlSchemaSimpleType (System.Xml.Schema.XmlSchemaSimpleType ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  8980. {
  8981. if (((object)ob) == null)
  8982. {
  8983. if (isNullable)
  8984. WriteNullTagLiteral(element, namesp);
  8985. return;
  8986. }
  8987. System.Type type = ob.GetType ();
  8988. if (type == typeof(System.Xml.Schema.XmlSchemaSimpleType))
  8989. { }
  8990. else {
  8991. throw CreateUnknownTypeException (ob);
  8992. }
  8993. if (writeWrappingElem) {
  8994. WriteStartElement (element, namesp, ob);
  8995. }
  8996. if (needType) WriteXsiType("XmlSchemaSimpleType", "http://www.w3.org/2001/XMLSchema");
  8997. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  8998. ICollection o293 = ob.@UnhandledAttributes;
  8999. if (o293 != null) {
  9000. foreach (XmlAttribute o294 in o293)
  9001. if (o294.NamespaceURI != xmlNamespace)
  9002. WriteXmlAttribute (o294, ob);
  9003. }
  9004. WriteAttribute ("id", "", ob.@Id);
  9005. WriteAttribute ("name", "", ob.@Name);
  9006. if (ob.@Final != ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None)) {
  9007. WriteAttribute ("final", "", GetEnumValue_XmlSchemaDerivationMethod (ob.@Final));
  9008. }
  9009. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9010. if (ob.@Content is System.Xml.Schema.XmlSchemaSimpleTypeUnion) {
  9011. WriteObject_XmlSchemaSimpleTypeUnion (((System.Xml.Schema.XmlSchemaSimpleTypeUnion) ob.@Content), "union", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9012. }
  9013. else if (ob.@Content is System.Xml.Schema.XmlSchemaSimpleTypeList) {
  9014. WriteObject_XmlSchemaSimpleTypeList (((System.Xml.Schema.XmlSchemaSimpleTypeList) ob.@Content), "list", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9015. }
  9016. else if (ob.@Content is System.Xml.Schema.XmlSchemaSimpleTypeRestriction) {
  9017. WriteObject_XmlSchemaSimpleTypeRestriction (((System.Xml.Schema.XmlSchemaSimpleTypeRestriction) ob.@Content), "restriction", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9018. }
  9019. if (writeWrappingElem) WriteEndElement (ob);
  9020. }
  9021. void WriteObject_XmlSchemaUse (System.Xml.Schema.XmlSchemaUse ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9022. {
  9023. System.Type type = ob.GetType ();
  9024. if (type == typeof(System.Xml.Schema.XmlSchemaUse))
  9025. { }
  9026. else {
  9027. throw CreateUnknownTypeException (ob);
  9028. }
  9029. if (writeWrappingElem) {
  9030. WriteStartElement (element, namesp, ob);
  9031. }
  9032. if (needType) WriteXsiType("XmlSchemaUse", "");
  9033. Writer.WriteString (GetEnumValue_XmlSchemaUse (ob));
  9034. if (writeWrappingElem) WriteEndElement (ob);
  9035. }
  9036. string GetEnumValue_XmlSchemaUse (System.Xml.Schema.XmlSchemaUse val)
  9037. {
  9038. switch (val) {
  9039. case System.Xml.Schema.XmlSchemaUse.Optional: return "optional";
  9040. case System.Xml.Schema.XmlSchemaUse.Prohibited: return "prohibited";
  9041. case System.Xml.Schema.XmlSchemaUse.Required: return "required";
  9042. default: return ((long)val).ToString(CultureInfo.InvariantCulture);
  9043. }
  9044. }
  9045. void WriteObject_XmlSchemaAttribute (System.Xml.Schema.XmlSchemaAttribute ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9046. {
  9047. if (((object)ob) == null)
  9048. {
  9049. if (isNullable)
  9050. WriteNullTagLiteral(element, namesp);
  9051. return;
  9052. }
  9053. System.Type type = ob.GetType ();
  9054. if (type == typeof(System.Xml.Schema.XmlSchemaAttribute))
  9055. { }
  9056. else {
  9057. throw CreateUnknownTypeException (ob);
  9058. }
  9059. if (writeWrappingElem) {
  9060. WriteStartElement (element, namesp, ob);
  9061. }
  9062. if (needType) WriteXsiType("XmlSchemaAttribute", "http://www.w3.org/2001/XMLSchema");
  9063. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  9064. ICollection o295 = ob.@UnhandledAttributes;
  9065. if (o295 != null) {
  9066. foreach (XmlAttribute o296 in o295)
  9067. if (o296.NamespaceURI != xmlNamespace)
  9068. WriteXmlAttribute (o296, ob);
  9069. }
  9070. WriteAttribute ("id", "", ob.@Id);
  9071. if (ob.@DefaultValue != null) {
  9072. WriteAttribute ("default", "", ob.@DefaultValue);
  9073. }
  9074. if (ob.@FixedValue != null) {
  9075. WriteAttribute ("fixed", "", ob.@FixedValue);
  9076. }
  9077. if (ob.@Form != ((System.Xml.Schema.XmlSchemaForm) System.Xml.Schema.XmlSchemaForm.None)) {
  9078. WriteAttribute ("form", "", GetEnumValue_XmlSchemaForm (ob.@Form));
  9079. }
  9080. WriteAttribute ("name", "", ob.@Name);
  9081. WriteAttribute ("ref", "", FromXmlQualifiedName (ob.@RefName));
  9082. WriteAttribute ("type", "", FromXmlQualifiedName (ob.@SchemaTypeName));
  9083. if (ob.@Use != ((System.Xml.Schema.XmlSchemaUse) System.Xml.Schema.XmlSchemaUse.None)) {
  9084. WriteAttribute ("use", "", GetEnumValue_XmlSchemaUse (ob.@Use));
  9085. }
  9086. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9087. WriteObject_XmlSchemaSimpleType (ob.@SchemaType, "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9088. if (writeWrappingElem) WriteEndElement (ob);
  9089. }
  9090. void WriteObject_XmlSchemaContentProcessing (System.Xml.Schema.XmlSchemaContentProcessing ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9091. {
  9092. System.Type type = ob.GetType ();
  9093. if (type == typeof(System.Xml.Schema.XmlSchemaContentProcessing))
  9094. { }
  9095. else {
  9096. throw CreateUnknownTypeException (ob);
  9097. }
  9098. if (writeWrappingElem) {
  9099. WriteStartElement (element, namesp, ob);
  9100. }
  9101. if (needType) WriteXsiType("XmlSchemaContentProcessing", "");
  9102. Writer.WriteString (GetEnumValue_XmlSchemaContentProcessing (ob));
  9103. if (writeWrappingElem) WriteEndElement (ob);
  9104. }
  9105. string GetEnumValue_XmlSchemaContentProcessing (System.Xml.Schema.XmlSchemaContentProcessing val)
  9106. {
  9107. switch (val) {
  9108. case System.Xml.Schema.XmlSchemaContentProcessing.Skip: return "skip";
  9109. case System.Xml.Schema.XmlSchemaContentProcessing.Lax: return "lax";
  9110. case System.Xml.Schema.XmlSchemaContentProcessing.Strict: return "strict";
  9111. default: return ((long)val).ToString(CultureInfo.InvariantCulture);
  9112. }
  9113. }
  9114. void WriteObject_XmlSchemaAnyAttribute (System.Xml.Schema.XmlSchemaAnyAttribute ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9115. {
  9116. if (((object)ob) == null)
  9117. {
  9118. if (isNullable)
  9119. WriteNullTagLiteral(element, namesp);
  9120. return;
  9121. }
  9122. System.Type type = ob.GetType ();
  9123. if (type == typeof(System.Xml.Schema.XmlSchemaAnyAttribute))
  9124. { }
  9125. else {
  9126. throw CreateUnknownTypeException (ob);
  9127. }
  9128. if (writeWrappingElem) {
  9129. WriteStartElement (element, namesp, ob);
  9130. }
  9131. if (needType) WriteXsiType("XmlSchemaAnyAttribute", "http://www.w3.org/2001/XMLSchema");
  9132. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  9133. ICollection o297 = ob.@UnhandledAttributes;
  9134. if (o297 != null) {
  9135. foreach (XmlAttribute o298 in o297)
  9136. if (o298.NamespaceURI != xmlNamespace)
  9137. WriteXmlAttribute (o298, ob);
  9138. }
  9139. WriteAttribute ("id", "", ob.@Id);
  9140. WriteAttribute ("namespace", "", ob.@Namespace);
  9141. if (ob.@ProcessContents != ((System.Xml.Schema.XmlSchemaContentProcessing) System.Xml.Schema.XmlSchemaContentProcessing.None)) {
  9142. WriteAttribute ("processContents", "", GetEnumValue_XmlSchemaContentProcessing (ob.@ProcessContents));
  9143. }
  9144. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9145. if (writeWrappingElem) WriteEndElement (ob);
  9146. }
  9147. void WriteObject_XmlSchemaAttributeGroup (System.Xml.Schema.XmlSchemaAttributeGroup ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9148. {
  9149. if (((object)ob) == null)
  9150. {
  9151. if (isNullable)
  9152. WriteNullTagLiteral(element, namesp);
  9153. return;
  9154. }
  9155. System.Type type = ob.GetType ();
  9156. if (type == typeof(System.Xml.Schema.XmlSchemaAttributeGroup))
  9157. { }
  9158. else {
  9159. throw CreateUnknownTypeException (ob);
  9160. }
  9161. if (writeWrappingElem) {
  9162. WriteStartElement (element, namesp, ob);
  9163. }
  9164. if (needType) WriteXsiType("XmlSchemaAttributeGroup", "http://www.w3.org/2001/XMLSchema");
  9165. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  9166. ICollection o299 = ob.@UnhandledAttributes;
  9167. if (o299 != null) {
  9168. foreach (XmlAttribute o300 in o299)
  9169. if (o300.NamespaceURI != xmlNamespace)
  9170. WriteXmlAttribute (o300, ob);
  9171. }
  9172. WriteAttribute ("id", "", ob.@Id);
  9173. WriteAttribute ("name", "", ob.@Name);
  9174. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9175. if (ob.@Attributes != null) {
  9176. for (int n301 = 0; n301 < [email protected]; n301++) {
  9177. if (((object)ob.@Attributes[n301]) == null) { }
  9178. else if (ob.@Attributes[n301].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef)) {
  9179. WriteObject_XmlSchemaAttributeGroupRef (((System.Xml.Schema.XmlSchemaAttributeGroupRef) ob.@Attributes[n301]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9180. }
  9181. else if (ob.@Attributes[n301].GetType() == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
  9182. WriteObject_XmlSchemaAttribute (((System.Xml.Schema.XmlSchemaAttribute) ob.@Attributes[n301]), "attribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9183. }
  9184. else throw CreateUnknownTypeException (ob.@Attributes[n301]);
  9185. }
  9186. }
  9187. WriteObject_XmlSchemaAnyAttribute (ob.@AnyAttribute, "anyAttribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9188. if (writeWrappingElem) WriteEndElement (ob);
  9189. }
  9190. void WriteObject_XmlSchemaParticle (System.Xml.Schema.XmlSchemaParticle ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9191. {
  9192. if (((object)ob) == null)
  9193. {
  9194. if (isNullable)
  9195. WriteNullTagLiteral(element, namesp);
  9196. return;
  9197. }
  9198. System.Type type = ob.GetType ();
  9199. if (type == typeof(System.Xml.Schema.XmlSchemaParticle))
  9200. { }
  9201. else if (type == typeof(System.Xml.Schema.XmlSchemaAny)) {
  9202. WriteObject_XmlSchemaAny((System.Xml.Schema.XmlSchemaAny)ob, element, namesp, isNullable, true, writeWrappingElem);
  9203. return;
  9204. }
  9205. else if (type == typeof(System.Xml.Schema.XmlSchemaGroupRef)) {
  9206. WriteObject_XmlSchemaGroupRef((System.Xml.Schema.XmlSchemaGroupRef)ob, element, namesp, isNullable, true, writeWrappingElem);
  9207. return;
  9208. }
  9209. else if (type == typeof(System.Xml.Schema.XmlSchemaGroupBase)) {
  9210. WriteObject_XmlSchemaGroupBase((System.Xml.Schema.XmlSchemaGroupBase)ob, element, namesp, isNullable, true, writeWrappingElem);
  9211. return;
  9212. }
  9213. else if (type == typeof(System.Xml.Schema.XmlSchemaAll)) {
  9214. WriteObject_XmlSchemaAll((System.Xml.Schema.XmlSchemaAll)ob, element, namesp, isNullable, true, writeWrappingElem);
  9215. return;
  9216. }
  9217. else if (type == typeof(System.Xml.Schema.XmlSchemaElement)) {
  9218. WriteObject_XmlSchemaElement((System.Xml.Schema.XmlSchemaElement)ob, element, namesp, isNullable, true, writeWrappingElem);
  9219. return;
  9220. }
  9221. else if (type == typeof(System.Xml.Schema.XmlSchemaChoice)) {
  9222. WriteObject_XmlSchemaChoice((System.Xml.Schema.XmlSchemaChoice)ob, element, namesp, isNullable, true, writeWrappingElem);
  9223. return;
  9224. }
  9225. else if (type == typeof(System.Xml.Schema.XmlSchemaSequence)) {
  9226. WriteObject_XmlSchemaSequence((System.Xml.Schema.XmlSchemaSequence)ob, element, namesp, isNullable, true, writeWrappingElem);
  9227. return;
  9228. }
  9229. else {
  9230. throw CreateUnknownTypeException (ob);
  9231. }
  9232. if (writeWrappingElem) {
  9233. WriteStartElement (element, namesp, ob);
  9234. }
  9235. if (needType) WriteXsiType("XmlSchemaParticle", "http://www.w3.org/2001/XMLSchema");
  9236. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  9237. ICollection o302 = ob.@UnhandledAttributes;
  9238. if (o302 != null) {
  9239. foreach (XmlAttribute o303 in o302)
  9240. if (o303.NamespaceURI != xmlNamespace)
  9241. WriteXmlAttribute (o303, ob);
  9242. }
  9243. WriteAttribute ("id", "", ob.@Id);
  9244. WriteAttribute ("minOccurs", "", ob.@MinOccursString);
  9245. WriteAttribute ("maxOccurs", "", ob.@MaxOccursString);
  9246. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9247. if (writeWrappingElem) WriteEndElement (ob);
  9248. }
  9249. void WriteObject_XmlSchemaAny (System.Xml.Schema.XmlSchemaAny ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9250. {
  9251. if (((object)ob) == null)
  9252. {
  9253. if (isNullable)
  9254. WriteNullTagLiteral(element, namesp);
  9255. return;
  9256. }
  9257. System.Type type = ob.GetType ();
  9258. if (type == typeof(System.Xml.Schema.XmlSchemaAny))
  9259. { }
  9260. else {
  9261. throw CreateUnknownTypeException (ob);
  9262. }
  9263. if (writeWrappingElem) {
  9264. WriteStartElement (element, namesp, ob);
  9265. }
  9266. if (needType) WriteXsiType("XmlSchemaAny", "http://www.w3.org/2001/XMLSchema");
  9267. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  9268. ICollection o304 = ob.@UnhandledAttributes;
  9269. if (o304 != null) {
  9270. foreach (XmlAttribute o305 in o304)
  9271. if (o305.NamespaceURI != xmlNamespace)
  9272. WriteXmlAttribute (o305, ob);
  9273. }
  9274. WriteAttribute ("id", "", ob.@Id);
  9275. WriteAttribute ("minOccurs", "", ob.@MinOccursString);
  9276. WriteAttribute ("maxOccurs", "", ob.@MaxOccursString);
  9277. WriteAttribute ("namespace", "", ob.@Namespace);
  9278. if (ob.@ProcessContents != ((System.Xml.Schema.XmlSchemaContentProcessing) System.Xml.Schema.XmlSchemaContentProcessing.None)) {
  9279. WriteAttribute ("processContents", "", GetEnumValue_XmlSchemaContentProcessing (ob.@ProcessContents));
  9280. }
  9281. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9282. if (writeWrappingElem) WriteEndElement (ob);
  9283. }
  9284. void WriteObject_XmlSchemaGroupRef (System.Xml.Schema.XmlSchemaGroupRef ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9285. {
  9286. if (((object)ob) == null)
  9287. {
  9288. if (isNullable)
  9289. WriteNullTagLiteral(element, namesp);
  9290. return;
  9291. }
  9292. System.Type type = ob.GetType ();
  9293. if (type == typeof(System.Xml.Schema.XmlSchemaGroupRef))
  9294. { }
  9295. else {
  9296. throw CreateUnknownTypeException (ob);
  9297. }
  9298. if (writeWrappingElem) {
  9299. WriteStartElement (element, namesp, ob);
  9300. }
  9301. if (needType) WriteXsiType("XmlSchemaGroupRef", "http://www.w3.org/2001/XMLSchema");
  9302. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  9303. ICollection o306 = ob.@UnhandledAttributes;
  9304. if (o306 != null) {
  9305. foreach (XmlAttribute o307 in o306)
  9306. if (o307.NamespaceURI != xmlNamespace)
  9307. WriteXmlAttribute (o307, ob);
  9308. }
  9309. WriteAttribute ("id", "", ob.@Id);
  9310. WriteAttribute ("minOccurs", "", ob.@MinOccursString);
  9311. WriteAttribute ("maxOccurs", "", ob.@MaxOccursString);
  9312. WriteAttribute ("ref", "", FromXmlQualifiedName (ob.@RefName));
  9313. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9314. if (writeWrappingElem) WriteEndElement (ob);
  9315. }
  9316. void WriteObject_XmlSchemaGroupBase (System.Xml.Schema.XmlSchemaGroupBase ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9317. {
  9318. if (((object)ob) == null)
  9319. {
  9320. if (isNullable)
  9321. WriteNullTagLiteral(element, namesp);
  9322. return;
  9323. }
  9324. System.Type type = ob.GetType ();
  9325. if (type == typeof(System.Xml.Schema.XmlSchemaGroupBase))
  9326. { }
  9327. else if (type == typeof(System.Xml.Schema.XmlSchemaAll)) {
  9328. WriteObject_XmlSchemaAll((System.Xml.Schema.XmlSchemaAll)ob, element, namesp, isNullable, true, writeWrappingElem);
  9329. return;
  9330. }
  9331. else if (type == typeof(System.Xml.Schema.XmlSchemaChoice)) {
  9332. WriteObject_XmlSchemaChoice((System.Xml.Schema.XmlSchemaChoice)ob, element, namesp, isNullable, true, writeWrappingElem);
  9333. return;
  9334. }
  9335. else if (type == typeof(System.Xml.Schema.XmlSchemaSequence)) {
  9336. WriteObject_XmlSchemaSequence((System.Xml.Schema.XmlSchemaSequence)ob, element, namesp, isNullable, true, writeWrappingElem);
  9337. return;
  9338. }
  9339. else {
  9340. throw CreateUnknownTypeException (ob);
  9341. }
  9342. if (writeWrappingElem) {
  9343. WriteStartElement (element, namesp, ob);
  9344. }
  9345. if (needType) WriteXsiType("XmlSchemaGroupBase", "http://www.w3.org/2001/XMLSchema");
  9346. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  9347. ICollection o308 = ob.@UnhandledAttributes;
  9348. if (o308 != null) {
  9349. foreach (XmlAttribute o309 in o308)
  9350. if (o309.NamespaceURI != xmlNamespace)
  9351. WriteXmlAttribute (o309, ob);
  9352. }
  9353. WriteAttribute ("id", "", ob.@Id);
  9354. WriteAttribute ("minOccurs", "", ob.@MinOccursString);
  9355. WriteAttribute ("maxOccurs", "", ob.@MaxOccursString);
  9356. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9357. if (writeWrappingElem) WriteEndElement (ob);
  9358. }
  9359. void WriteObject_XmlSchemaAll (System.Xml.Schema.XmlSchemaAll ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9360. {
  9361. if (((object)ob) == null)
  9362. {
  9363. if (isNullable)
  9364. WriteNullTagLiteral(element, namesp);
  9365. return;
  9366. }
  9367. System.Type type = ob.GetType ();
  9368. if (type == typeof(System.Xml.Schema.XmlSchemaAll))
  9369. { }
  9370. else {
  9371. throw CreateUnknownTypeException (ob);
  9372. }
  9373. if (writeWrappingElem) {
  9374. WriteStartElement (element, namesp, ob);
  9375. }
  9376. if (needType) WriteXsiType("XmlSchemaAll", "http://www.w3.org/2001/XMLSchema");
  9377. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  9378. ICollection o310 = ob.@UnhandledAttributes;
  9379. if (o310 != null) {
  9380. foreach (XmlAttribute o311 in o310)
  9381. if (o311.NamespaceURI != xmlNamespace)
  9382. WriteXmlAttribute (o311, ob);
  9383. }
  9384. WriteAttribute ("id", "", ob.@Id);
  9385. WriteAttribute ("minOccurs", "", ob.@MinOccursString);
  9386. WriteAttribute ("maxOccurs", "", ob.@MaxOccursString);
  9387. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9388. if (ob.@Items != null) {
  9389. for (int n312 = 0; n312 < [email protected]; n312++) {
  9390. WriteObject_XmlSchemaElement (((System.Xml.Schema.XmlSchemaElement) ob.@Items[n312]), "element", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9391. }
  9392. }
  9393. if (writeWrappingElem) WriteEndElement (ob);
  9394. }
  9395. void WriteObject_XmlSchemaContent (System.Xml.Schema.XmlSchemaContent ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9396. {
  9397. if (((object)ob) == null)
  9398. {
  9399. if (isNullable)
  9400. WriteNullTagLiteral(element, namesp);
  9401. return;
  9402. }
  9403. System.Type type = ob.GetType ();
  9404. if (type == typeof(System.Xml.Schema.XmlSchemaContent))
  9405. { }
  9406. else if (type == typeof(System.Xml.Schema.XmlSchemaComplexContentExtension)) {
  9407. WriteObject_XmlSchemaComplexContentExtension((System.Xml.Schema.XmlSchemaComplexContentExtension)ob, element, namesp, isNullable, true, writeWrappingElem);
  9408. return;
  9409. }
  9410. else if (type == typeof(System.Xml.Schema.XmlSchemaComplexContentRestriction)) {
  9411. WriteObject_XmlSchemaComplexContentRestriction((System.Xml.Schema.XmlSchemaComplexContentRestriction)ob, element, namesp, isNullable, true, writeWrappingElem);
  9412. return;
  9413. }
  9414. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleContentExtension)) {
  9415. WriteObject_XmlSchemaSimpleContentExtension((System.Xml.Schema.XmlSchemaSimpleContentExtension)ob, element, namesp, isNullable, true, writeWrappingElem);
  9416. return;
  9417. }
  9418. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleContentRestriction)) {
  9419. WriteObject_XmlSchemaSimpleContentRestriction((System.Xml.Schema.XmlSchemaSimpleContentRestriction)ob, element, namesp, isNullable, true, writeWrappingElem);
  9420. return;
  9421. }
  9422. else {
  9423. throw CreateUnknownTypeException (ob);
  9424. }
  9425. if (writeWrappingElem) {
  9426. WriteStartElement (element, namesp, ob);
  9427. }
  9428. if (needType) WriteXsiType("XmlSchemaContent", "http://www.w3.org/2001/XMLSchema");
  9429. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  9430. ICollection o313 = ob.@UnhandledAttributes;
  9431. if (o313 != null) {
  9432. foreach (XmlAttribute o314 in o313)
  9433. if (o314.NamespaceURI != xmlNamespace)
  9434. WriteXmlAttribute (o314, ob);
  9435. }
  9436. WriteAttribute ("id", "", ob.@Id);
  9437. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9438. if (writeWrappingElem) WriteEndElement (ob);
  9439. }
  9440. void WriteObject_XmlSchemaComplexContentExtension (System.Xml.Schema.XmlSchemaComplexContentExtension ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9441. {
  9442. if (((object)ob) == null)
  9443. {
  9444. if (isNullable)
  9445. WriteNullTagLiteral(element, namesp);
  9446. return;
  9447. }
  9448. System.Type type = ob.GetType ();
  9449. if (type == typeof(System.Xml.Schema.XmlSchemaComplexContentExtension))
  9450. { }
  9451. else {
  9452. throw CreateUnknownTypeException (ob);
  9453. }
  9454. if (writeWrappingElem) {
  9455. WriteStartElement (element, namesp, ob);
  9456. }
  9457. if (needType) WriteXsiType("XmlSchemaComplexContentExtension", "http://www.w3.org/2001/XMLSchema");
  9458. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  9459. ICollection o315 = ob.@UnhandledAttributes;
  9460. if (o315 != null) {
  9461. foreach (XmlAttribute o316 in o315)
  9462. if (o316.NamespaceURI != xmlNamespace)
  9463. WriteXmlAttribute (o316, ob);
  9464. }
  9465. WriteAttribute ("id", "", ob.@Id);
  9466. WriteAttribute ("base", "", FromXmlQualifiedName (ob.@BaseTypeName));
  9467. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9468. if (ob.@Particle is System.Xml.Schema.XmlSchemaSequence) {
  9469. WriteObject_XmlSchemaSequence (((System.Xml.Schema.XmlSchemaSequence) ob.@Particle), "sequence", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9470. }
  9471. else if (ob.@Particle is System.Xml.Schema.XmlSchemaChoice) {
  9472. WriteObject_XmlSchemaChoice (((System.Xml.Schema.XmlSchemaChoice) ob.@Particle), "choice", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9473. }
  9474. else if (ob.@Particle is System.Xml.Schema.XmlSchemaAll) {
  9475. WriteObject_XmlSchemaAll (((System.Xml.Schema.XmlSchemaAll) ob.@Particle), "all", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9476. }
  9477. else if (ob.@Particle is System.Xml.Schema.XmlSchemaGroupRef) {
  9478. WriteObject_XmlSchemaGroupRef (((System.Xml.Schema.XmlSchemaGroupRef) ob.@Particle), "group", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9479. }
  9480. if (ob.@Attributes != null) {
  9481. for (int n317 = 0; n317 < [email protected]; n317++) {
  9482. if (((object)ob.@Attributes[n317]) == null) { }
  9483. else if (ob.@Attributes[n317].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef)) {
  9484. WriteObject_XmlSchemaAttributeGroupRef (((System.Xml.Schema.XmlSchemaAttributeGroupRef) ob.@Attributes[n317]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9485. }
  9486. else if (ob.@Attributes[n317].GetType() == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
  9487. WriteObject_XmlSchemaAttribute (((System.Xml.Schema.XmlSchemaAttribute) ob.@Attributes[n317]), "attribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9488. }
  9489. else throw CreateUnknownTypeException (ob.@Attributes[n317]);
  9490. }
  9491. }
  9492. WriteObject_XmlSchemaAnyAttribute (ob.@AnyAttribute, "anyAttribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9493. if (writeWrappingElem) WriteEndElement (ob);
  9494. }
  9495. void WriteObject_XmlSchemaComplexContentRestriction (System.Xml.Schema.XmlSchemaComplexContentRestriction ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9496. {
  9497. if (((object)ob) == null)
  9498. {
  9499. if (isNullable)
  9500. WriteNullTagLiteral(element, namesp);
  9501. return;
  9502. }
  9503. System.Type type = ob.GetType ();
  9504. if (type == typeof(System.Xml.Schema.XmlSchemaComplexContentRestriction))
  9505. { }
  9506. else {
  9507. throw CreateUnknownTypeException (ob);
  9508. }
  9509. if (writeWrappingElem) {
  9510. WriteStartElement (element, namesp, ob);
  9511. }
  9512. if (needType) WriteXsiType("XmlSchemaComplexContentRestriction", "http://www.w3.org/2001/XMLSchema");
  9513. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  9514. ICollection o318 = ob.@UnhandledAttributes;
  9515. if (o318 != null) {
  9516. foreach (XmlAttribute o319 in o318)
  9517. if (o319.NamespaceURI != xmlNamespace)
  9518. WriteXmlAttribute (o319, ob);
  9519. }
  9520. WriteAttribute ("id", "", ob.@Id);
  9521. WriteAttribute ("base", "", FromXmlQualifiedName (ob.@BaseTypeName));
  9522. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9523. if (ob.@Particle is System.Xml.Schema.XmlSchemaSequence) {
  9524. WriteObject_XmlSchemaSequence (((System.Xml.Schema.XmlSchemaSequence) ob.@Particle), "sequence", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9525. }
  9526. else if (ob.@Particle is System.Xml.Schema.XmlSchemaChoice) {
  9527. WriteObject_XmlSchemaChoice (((System.Xml.Schema.XmlSchemaChoice) ob.@Particle), "choice", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9528. }
  9529. else if (ob.@Particle is System.Xml.Schema.XmlSchemaAll) {
  9530. WriteObject_XmlSchemaAll (((System.Xml.Schema.XmlSchemaAll) ob.@Particle), "all", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9531. }
  9532. else if (ob.@Particle is System.Xml.Schema.XmlSchemaGroupRef) {
  9533. WriteObject_XmlSchemaGroupRef (((System.Xml.Schema.XmlSchemaGroupRef) ob.@Particle), "group", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9534. }
  9535. if (ob.@Attributes != null) {
  9536. for (int n320 = 0; n320 < [email protected]; n320++) {
  9537. if (((object)ob.@Attributes[n320]) == null) { }
  9538. else if (ob.@Attributes[n320].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef)) {
  9539. WriteObject_XmlSchemaAttributeGroupRef (((System.Xml.Schema.XmlSchemaAttributeGroupRef) ob.@Attributes[n320]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9540. }
  9541. else if (ob.@Attributes[n320].GetType() == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
  9542. WriteObject_XmlSchemaAttribute (((System.Xml.Schema.XmlSchemaAttribute) ob.@Attributes[n320]), "attribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9543. }
  9544. else throw CreateUnknownTypeException (ob.@Attributes[n320]);
  9545. }
  9546. }
  9547. WriteObject_XmlSchemaAnyAttribute (ob.@AnyAttribute, "anyAttribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9548. if (writeWrappingElem) WriteEndElement (ob);
  9549. }
  9550. void WriteObject_XmlSchemaContentModel (System.Xml.Schema.XmlSchemaContentModel ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9551. {
  9552. if (((object)ob) == null)
  9553. {
  9554. if (isNullable)
  9555. WriteNullTagLiteral(element, namesp);
  9556. return;
  9557. }
  9558. System.Type type = ob.GetType ();
  9559. if (type == typeof(System.Xml.Schema.XmlSchemaContentModel))
  9560. { }
  9561. else if (type == typeof(System.Xml.Schema.XmlSchemaComplexContent)) {
  9562. WriteObject_XmlSchemaComplexContent((System.Xml.Schema.XmlSchemaComplexContent)ob, element, namesp, isNullable, true, writeWrappingElem);
  9563. return;
  9564. }
  9565. else if (type == typeof(System.Xml.Schema.XmlSchemaSimpleContent)) {
  9566. WriteObject_XmlSchemaSimpleContent((System.Xml.Schema.XmlSchemaSimpleContent)ob, element, namesp, isNullable, true, writeWrappingElem);
  9567. return;
  9568. }
  9569. else {
  9570. throw CreateUnknownTypeException (ob);
  9571. }
  9572. if (writeWrappingElem) {
  9573. WriteStartElement (element, namesp, ob);
  9574. }
  9575. if (needType) WriteXsiType("XmlSchemaContentModel", "http://www.w3.org/2001/XMLSchema");
  9576. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  9577. ICollection o321 = ob.@UnhandledAttributes;
  9578. if (o321 != null) {
  9579. foreach (XmlAttribute o322 in o321)
  9580. if (o322.NamespaceURI != xmlNamespace)
  9581. WriteXmlAttribute (o322, ob);
  9582. }
  9583. WriteAttribute ("id", "", ob.@Id);
  9584. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9585. if (writeWrappingElem) WriteEndElement (ob);
  9586. }
  9587. void WriteObject_XmlSchemaComplexContent (System.Xml.Schema.XmlSchemaComplexContent ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9588. {
  9589. if (((object)ob) == null)
  9590. {
  9591. if (isNullable)
  9592. WriteNullTagLiteral(element, namesp);
  9593. return;
  9594. }
  9595. System.Type type = ob.GetType ();
  9596. if (type == typeof(System.Xml.Schema.XmlSchemaComplexContent))
  9597. { }
  9598. else {
  9599. throw CreateUnknownTypeException (ob);
  9600. }
  9601. if (writeWrappingElem) {
  9602. WriteStartElement (element, namesp, ob);
  9603. }
  9604. if (needType) WriteXsiType("XmlSchemaComplexContent", "http://www.w3.org/2001/XMLSchema");
  9605. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  9606. ICollection o323 = ob.@UnhandledAttributes;
  9607. if (o323 != null) {
  9608. foreach (XmlAttribute o324 in o323)
  9609. if (o324.NamespaceURI != xmlNamespace)
  9610. WriteXmlAttribute (o324, ob);
  9611. }
  9612. WriteAttribute ("id", "", ob.@Id);
  9613. WriteAttribute ("mixed", "", (ob.@IsMixed?"true":"false"));
  9614. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9615. if (ob.@Content is System.Xml.Schema.XmlSchemaComplexContentExtension) {
  9616. WriteObject_XmlSchemaComplexContentExtension (((System.Xml.Schema.XmlSchemaComplexContentExtension) ob.@Content), "extension", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9617. }
  9618. else if (ob.@Content is System.Xml.Schema.XmlSchemaComplexContentRestriction) {
  9619. WriteObject_XmlSchemaComplexContentRestriction (((System.Xml.Schema.XmlSchemaComplexContentRestriction) ob.@Content), "restriction", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9620. }
  9621. if (writeWrappingElem) WriteEndElement (ob);
  9622. }
  9623. void WriteObject_XmlSchemaSimpleContentExtension (System.Xml.Schema.XmlSchemaSimpleContentExtension ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9624. {
  9625. if (((object)ob) == null)
  9626. {
  9627. if (isNullable)
  9628. WriteNullTagLiteral(element, namesp);
  9629. return;
  9630. }
  9631. System.Type type = ob.GetType ();
  9632. if (type == typeof(System.Xml.Schema.XmlSchemaSimpleContentExtension))
  9633. { }
  9634. else {
  9635. throw CreateUnknownTypeException (ob);
  9636. }
  9637. if (writeWrappingElem) {
  9638. WriteStartElement (element, namesp, ob);
  9639. }
  9640. if (needType) WriteXsiType("XmlSchemaSimpleContentExtension", "http://www.w3.org/2001/XMLSchema");
  9641. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  9642. ICollection o325 = ob.@UnhandledAttributes;
  9643. if (o325 != null) {
  9644. foreach (XmlAttribute o326 in o325)
  9645. if (o326.NamespaceURI != xmlNamespace)
  9646. WriteXmlAttribute (o326, ob);
  9647. }
  9648. WriteAttribute ("id", "", ob.@Id);
  9649. WriteAttribute ("base", "", FromXmlQualifiedName (ob.@BaseTypeName));
  9650. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9651. if (ob.@Attributes != null) {
  9652. for (int n327 = 0; n327 < [email protected]; n327++) {
  9653. if (((object)ob.@Attributes[n327]) == null) { }
  9654. else if (ob.@Attributes[n327].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef)) {
  9655. WriteObject_XmlSchemaAttributeGroupRef (((System.Xml.Schema.XmlSchemaAttributeGroupRef) ob.@Attributes[n327]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9656. }
  9657. else if (ob.@Attributes[n327].GetType() == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
  9658. WriteObject_XmlSchemaAttribute (((System.Xml.Schema.XmlSchemaAttribute) ob.@Attributes[n327]), "attribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9659. }
  9660. else throw CreateUnknownTypeException (ob.@Attributes[n327]);
  9661. }
  9662. }
  9663. WriteObject_XmlSchemaAnyAttribute (ob.@AnyAttribute, "anyAttribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9664. if (writeWrappingElem) WriteEndElement (ob);
  9665. }
  9666. void WriteObject_XmlSchemaSimpleContentRestriction (System.Xml.Schema.XmlSchemaSimpleContentRestriction ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9667. {
  9668. if (((object)ob) == null)
  9669. {
  9670. if (isNullable)
  9671. WriteNullTagLiteral(element, namesp);
  9672. return;
  9673. }
  9674. System.Type type = ob.GetType ();
  9675. if (type == typeof(System.Xml.Schema.XmlSchemaSimpleContentRestriction))
  9676. { }
  9677. else {
  9678. throw CreateUnknownTypeException (ob);
  9679. }
  9680. if (writeWrappingElem) {
  9681. WriteStartElement (element, namesp, ob);
  9682. }
  9683. if (needType) WriteXsiType("XmlSchemaSimpleContentRestriction", "http://www.w3.org/2001/XMLSchema");
  9684. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  9685. ICollection o328 = ob.@UnhandledAttributes;
  9686. if (o328 != null) {
  9687. foreach (XmlAttribute o329 in o328)
  9688. if (o329.NamespaceURI != xmlNamespace)
  9689. WriteXmlAttribute (o329, ob);
  9690. }
  9691. WriteAttribute ("id", "", ob.@Id);
  9692. WriteAttribute ("base", "", FromXmlQualifiedName (ob.@BaseTypeName));
  9693. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9694. WriteObject_XmlSchemaSimpleType (ob.@BaseType, "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9695. if (ob.@Facets != null) {
  9696. for (int n330 = 0; n330 < [email protected]; n330++) {
  9697. if (((object)ob.@Facets[n330]) == null) { }
  9698. else if (ob.@Facets[n330].GetType() == typeof(System.Xml.Schema.XmlSchemaPatternFacet)) {
  9699. WriteObject_XmlSchemaPatternFacet (((System.Xml.Schema.XmlSchemaPatternFacet) ob.@Facets[n330]), "pattern", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9700. }
  9701. else if (ob.@Facets[n330].GetType() == typeof(System.Xml.Schema.XmlSchemaWhiteSpaceFacet)) {
  9702. WriteObject_XmlSchemaWhiteSpaceFacet (((System.Xml.Schema.XmlSchemaWhiteSpaceFacet) ob.@Facets[n330]), "whiteSpace", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9703. }
  9704. else if (ob.@Facets[n330].GetType() == typeof(System.Xml.Schema.XmlSchemaEnumerationFacet)) {
  9705. WriteObject_XmlSchemaEnumerationFacet (((System.Xml.Schema.XmlSchemaEnumerationFacet) ob.@Facets[n330]), "enumeration", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9706. }
  9707. else if (ob.@Facets[n330].GetType() == typeof(System.Xml.Schema.XmlSchemaMaxLengthFacet)) {
  9708. WriteObject_XmlSchemaMaxLengthFacet (((System.Xml.Schema.XmlSchemaMaxLengthFacet) ob.@Facets[n330]), "maxLength", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9709. }
  9710. else if (ob.@Facets[n330].GetType() == typeof(System.Xml.Schema.XmlSchemaMinLengthFacet)) {
  9711. WriteObject_XmlSchemaMinLengthFacet (((System.Xml.Schema.XmlSchemaMinLengthFacet) ob.@Facets[n330]), "minLength", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9712. }
  9713. else if (ob.@Facets[n330].GetType() == typeof(System.Xml.Schema.XmlSchemaLengthFacet)) {
  9714. WriteObject_XmlSchemaLengthFacet (((System.Xml.Schema.XmlSchemaLengthFacet) ob.@Facets[n330]), "length", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9715. }
  9716. else if (ob.@Facets[n330].GetType() == typeof(System.Xml.Schema.XmlSchemaFractionDigitsFacet)) {
  9717. WriteObject_XmlSchemaFractionDigitsFacet (((System.Xml.Schema.XmlSchemaFractionDigitsFacet) ob.@Facets[n330]), "fractionDigits", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9718. }
  9719. else if (ob.@Facets[n330].GetType() == typeof(System.Xml.Schema.XmlSchemaTotalDigitsFacet)) {
  9720. WriteObject_XmlSchemaTotalDigitsFacet (((System.Xml.Schema.XmlSchemaTotalDigitsFacet) ob.@Facets[n330]), "totalDigits", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9721. }
  9722. else if (ob.@Facets[n330].GetType() == typeof(System.Xml.Schema.XmlSchemaMaxInclusiveFacet)) {
  9723. WriteObject_XmlSchemaMaxInclusiveFacet (((System.Xml.Schema.XmlSchemaMaxInclusiveFacet) ob.@Facets[n330]), "maxInclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9724. }
  9725. else if (ob.@Facets[n330].GetType() == typeof(System.Xml.Schema.XmlSchemaMaxExclusiveFacet)) {
  9726. WriteObject_XmlSchemaMaxExclusiveFacet (((System.Xml.Schema.XmlSchemaMaxExclusiveFacet) ob.@Facets[n330]), "maxExclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9727. }
  9728. else if (ob.@Facets[n330].GetType() == typeof(System.Xml.Schema.XmlSchemaMinInclusiveFacet)) {
  9729. WriteObject_XmlSchemaMinInclusiveFacet (((System.Xml.Schema.XmlSchemaMinInclusiveFacet) ob.@Facets[n330]), "minInclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9730. }
  9731. else if (ob.@Facets[n330].GetType() == typeof(System.Xml.Schema.XmlSchemaMinExclusiveFacet)) {
  9732. WriteObject_XmlSchemaMinExclusiveFacet (((System.Xml.Schema.XmlSchemaMinExclusiveFacet) ob.@Facets[n330]), "minExclusive", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9733. }
  9734. else throw CreateUnknownTypeException (ob.@Facets[n330]);
  9735. }
  9736. }
  9737. if (ob.@Attributes != null) {
  9738. for (int n331 = 0; n331 < [email protected]; n331++) {
  9739. if (((object)ob.@Attributes[n331]) == null) { }
  9740. else if (ob.@Attributes[n331].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef)) {
  9741. WriteObject_XmlSchemaAttributeGroupRef (((System.Xml.Schema.XmlSchemaAttributeGroupRef) ob.@Attributes[n331]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9742. }
  9743. else if (ob.@Attributes[n331].GetType() == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
  9744. WriteObject_XmlSchemaAttribute (((System.Xml.Schema.XmlSchemaAttribute) ob.@Attributes[n331]), "attribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9745. }
  9746. else throw CreateUnknownTypeException (ob.@Attributes[n331]);
  9747. }
  9748. }
  9749. WriteObject_XmlSchemaAnyAttribute (ob.@AnyAttribute, "anyAttribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9750. if (writeWrappingElem) WriteEndElement (ob);
  9751. }
  9752. void WriteObject_XmlSchemaSimpleContent (System.Xml.Schema.XmlSchemaSimpleContent ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9753. {
  9754. if (((object)ob) == null)
  9755. {
  9756. if (isNullable)
  9757. WriteNullTagLiteral(element, namesp);
  9758. return;
  9759. }
  9760. System.Type type = ob.GetType ();
  9761. if (type == typeof(System.Xml.Schema.XmlSchemaSimpleContent))
  9762. { }
  9763. else {
  9764. throw CreateUnknownTypeException (ob);
  9765. }
  9766. if (writeWrappingElem) {
  9767. WriteStartElement (element, namesp, ob);
  9768. }
  9769. if (needType) WriteXsiType("XmlSchemaSimpleContent", "http://www.w3.org/2001/XMLSchema");
  9770. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  9771. ICollection o332 = ob.@UnhandledAttributes;
  9772. if (o332 != null) {
  9773. foreach (XmlAttribute o333 in o332)
  9774. if (o333.NamespaceURI != xmlNamespace)
  9775. WriteXmlAttribute (o333, ob);
  9776. }
  9777. WriteAttribute ("id", "", ob.@Id);
  9778. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9779. if (ob.@Content is System.Xml.Schema.XmlSchemaSimpleContentExtension) {
  9780. WriteObject_XmlSchemaSimpleContentExtension (((System.Xml.Schema.XmlSchemaSimpleContentExtension) ob.@Content), "extension", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9781. }
  9782. else if (ob.@Content is System.Xml.Schema.XmlSchemaSimpleContentRestriction) {
  9783. WriteObject_XmlSchemaSimpleContentRestriction (((System.Xml.Schema.XmlSchemaSimpleContentRestriction) ob.@Content), "restriction", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9784. }
  9785. if (writeWrappingElem) WriteEndElement (ob);
  9786. }
  9787. void WriteObject_XmlSchemaComplexType (System.Xml.Schema.XmlSchemaComplexType ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9788. {
  9789. if (((object)ob) == null)
  9790. {
  9791. if (isNullable)
  9792. WriteNullTagLiteral(element, namesp);
  9793. return;
  9794. }
  9795. System.Type type = ob.GetType ();
  9796. if (type == typeof(System.Xml.Schema.XmlSchemaComplexType))
  9797. { }
  9798. else {
  9799. throw CreateUnknownTypeException (ob);
  9800. }
  9801. if (writeWrappingElem) {
  9802. WriteStartElement (element, namesp, ob);
  9803. }
  9804. if (needType) WriteXsiType("XmlSchemaComplexType", "http://www.w3.org/2001/XMLSchema");
  9805. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  9806. ICollection o334 = ob.@UnhandledAttributes;
  9807. if (o334 != null) {
  9808. foreach (XmlAttribute o335 in o334)
  9809. if (o335.NamespaceURI != xmlNamespace)
  9810. WriteXmlAttribute (o335, ob);
  9811. }
  9812. WriteAttribute ("id", "", ob.@Id);
  9813. WriteAttribute ("name", "", ob.@Name);
  9814. if (ob.@Final != ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None)) {
  9815. WriteAttribute ("final", "", GetEnumValue_XmlSchemaDerivationMethod (ob.@Final));
  9816. }
  9817. if (ob.@IsAbstract != false) {
  9818. WriteAttribute ("abstract", "", (ob.@IsAbstract?"true":"false"));
  9819. }
  9820. if (ob.@Block != ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None)) {
  9821. WriteAttribute ("block", "", GetEnumValue_XmlSchemaDerivationMethod (ob.@Block));
  9822. }
  9823. if (ob.@IsMixed != false) {
  9824. WriteAttribute ("mixed", "", (ob.@IsMixed?"true":"false"));
  9825. }
  9826. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9827. if (ob.@ContentModel is System.Xml.Schema.XmlSchemaComplexContent) {
  9828. WriteObject_XmlSchemaComplexContent (((System.Xml.Schema.XmlSchemaComplexContent) ob.@ContentModel), "complexContent", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9829. }
  9830. else if (ob.@ContentModel is System.Xml.Schema.XmlSchemaSimpleContent) {
  9831. WriteObject_XmlSchemaSimpleContent (((System.Xml.Schema.XmlSchemaSimpleContent) ob.@ContentModel), "simpleContent", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9832. }
  9833. if (ob.@Particle is System.Xml.Schema.XmlSchemaSequence) {
  9834. WriteObject_XmlSchemaSequence (((System.Xml.Schema.XmlSchemaSequence) ob.@Particle), "sequence", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9835. }
  9836. else if (ob.@Particle is System.Xml.Schema.XmlSchemaChoice) {
  9837. WriteObject_XmlSchemaChoice (((System.Xml.Schema.XmlSchemaChoice) ob.@Particle), "choice", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9838. }
  9839. else if (ob.@Particle is System.Xml.Schema.XmlSchemaAll) {
  9840. WriteObject_XmlSchemaAll (((System.Xml.Schema.XmlSchemaAll) ob.@Particle), "all", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9841. }
  9842. else if (ob.@Particle is System.Xml.Schema.XmlSchemaGroupRef) {
  9843. WriteObject_XmlSchemaGroupRef (((System.Xml.Schema.XmlSchemaGroupRef) ob.@Particle), "group", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9844. }
  9845. if (ob.@Attributes != null) {
  9846. for (int n336 = 0; n336 < [email protected]; n336++) {
  9847. if (((object)ob.@Attributes[n336]) == null) { }
  9848. else if (ob.@Attributes[n336].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroupRef)) {
  9849. WriteObject_XmlSchemaAttributeGroupRef (((System.Xml.Schema.XmlSchemaAttributeGroupRef) ob.@Attributes[n336]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9850. }
  9851. else if (ob.@Attributes[n336].GetType() == typeof(System.Xml.Schema.XmlSchemaAttribute)) {
  9852. WriteObject_XmlSchemaAttribute (((System.Xml.Schema.XmlSchemaAttribute) ob.@Attributes[n336]), "attribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9853. }
  9854. else throw CreateUnknownTypeException (ob.@Attributes[n336]);
  9855. }
  9856. }
  9857. WriteObject_XmlSchemaAnyAttribute (ob.@AnyAttribute, "anyAttribute", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9858. if (writeWrappingElem) WriteEndElement (ob);
  9859. }
  9860. void WriteObject_XmlSchemaXPath (System.Xml.Schema.XmlSchemaXPath ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9861. {
  9862. if (((object)ob) == null)
  9863. {
  9864. if (isNullable)
  9865. WriteNullTagLiteral(element, namesp);
  9866. return;
  9867. }
  9868. System.Type type = ob.GetType ();
  9869. if (type == typeof(System.Xml.Schema.XmlSchemaXPath))
  9870. { }
  9871. else {
  9872. throw CreateUnknownTypeException (ob);
  9873. }
  9874. if (writeWrappingElem) {
  9875. WriteStartElement (element, namesp, ob);
  9876. }
  9877. if (needType) WriteXsiType("XmlSchemaXPath", "http://www.w3.org/2001/XMLSchema");
  9878. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  9879. ICollection o337 = ob.@UnhandledAttributes;
  9880. if (o337 != null) {
  9881. foreach (XmlAttribute o338 in o337)
  9882. if (o338.NamespaceURI != xmlNamespace)
  9883. WriteXmlAttribute (o338, ob);
  9884. }
  9885. WriteAttribute ("id", "", ob.@Id);
  9886. if (ob.@XPath != "") {
  9887. WriteAttribute ("xpath", "", ob.@XPath);
  9888. }
  9889. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9890. if (writeWrappingElem) WriteEndElement (ob);
  9891. }
  9892. void WriteObject_XmlSchemaIdentityConstraint (System.Xml.Schema.XmlSchemaIdentityConstraint ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9893. {
  9894. if (((object)ob) == null)
  9895. {
  9896. if (isNullable)
  9897. WriteNullTagLiteral(element, namesp);
  9898. return;
  9899. }
  9900. System.Type type = ob.GetType ();
  9901. if (type == typeof(System.Xml.Schema.XmlSchemaIdentityConstraint))
  9902. { }
  9903. else if (type == typeof(System.Xml.Schema.XmlSchemaKeyref)) {
  9904. WriteObject_XmlSchemaKeyref((System.Xml.Schema.XmlSchemaKeyref)ob, element, namesp, isNullable, true, writeWrappingElem);
  9905. return;
  9906. }
  9907. else if (type == typeof(System.Xml.Schema.XmlSchemaKey)) {
  9908. WriteObject_XmlSchemaKey((System.Xml.Schema.XmlSchemaKey)ob, element, namesp, isNullable, true, writeWrappingElem);
  9909. return;
  9910. }
  9911. else if (type == typeof(System.Xml.Schema.XmlSchemaUnique)) {
  9912. WriteObject_XmlSchemaUnique((System.Xml.Schema.XmlSchemaUnique)ob, element, namesp, isNullable, true, writeWrappingElem);
  9913. return;
  9914. }
  9915. else {
  9916. throw CreateUnknownTypeException (ob);
  9917. }
  9918. if (writeWrappingElem) {
  9919. WriteStartElement (element, namesp, ob);
  9920. }
  9921. if (needType) WriteXsiType("XmlSchemaIdentityConstraint", "http://www.w3.org/2001/XMLSchema");
  9922. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  9923. ICollection o339 = ob.@UnhandledAttributes;
  9924. if (o339 != null) {
  9925. foreach (XmlAttribute o340 in o339)
  9926. if (o340.NamespaceURI != xmlNamespace)
  9927. WriteXmlAttribute (o340, ob);
  9928. }
  9929. WriteAttribute ("id", "", ob.@Id);
  9930. WriteAttribute ("name", "", ob.@Name);
  9931. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9932. WriteObject_XmlSchemaXPath (ob.@Selector, "selector", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9933. if (ob.@Fields != null) {
  9934. for (int n341 = 0; n341 < [email protected]; n341++) {
  9935. WriteObject_XmlSchemaXPath (((System.Xml.Schema.XmlSchemaXPath) ob.@Fields[n341]), "field", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9936. }
  9937. }
  9938. if (writeWrappingElem) WriteEndElement (ob);
  9939. }
  9940. void WriteObject_XmlSchemaKeyref (System.Xml.Schema.XmlSchemaKeyref ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9941. {
  9942. if (((object)ob) == null)
  9943. {
  9944. if (isNullable)
  9945. WriteNullTagLiteral(element, namesp);
  9946. return;
  9947. }
  9948. System.Type type = ob.GetType ();
  9949. if (type == typeof(System.Xml.Schema.XmlSchemaKeyref))
  9950. { }
  9951. else {
  9952. throw CreateUnknownTypeException (ob);
  9953. }
  9954. if (writeWrappingElem) {
  9955. WriteStartElement (element, namesp, ob);
  9956. }
  9957. if (needType) WriteXsiType("XmlSchemaKeyref", "http://www.w3.org/2001/XMLSchema");
  9958. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  9959. ICollection o342 = ob.@UnhandledAttributes;
  9960. if (o342 != null) {
  9961. foreach (XmlAttribute o343 in o342)
  9962. if (o343.NamespaceURI != xmlNamespace)
  9963. WriteXmlAttribute (o343, ob);
  9964. }
  9965. WriteAttribute ("id", "", ob.@Id);
  9966. WriteAttribute ("name", "", ob.@Name);
  9967. WriteAttribute ("refer", "", FromXmlQualifiedName (ob.@Refer));
  9968. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9969. WriteObject_XmlSchemaXPath (ob.@Selector, "selector", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9970. if (ob.@Fields != null) {
  9971. for (int n344 = 0; n344 < [email protected]; n344++) {
  9972. WriteObject_XmlSchemaXPath (((System.Xml.Schema.XmlSchemaXPath) ob.@Fields[n344]), "field", "http://www.w3.org/2001/XMLSchema", false, false, true);
  9973. }
  9974. }
  9975. if (writeWrappingElem) WriteEndElement (ob);
  9976. }
  9977. void WriteObject_XmlSchemaKey (System.Xml.Schema.XmlSchemaKey ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  9978. {
  9979. if (((object)ob) == null)
  9980. {
  9981. if (isNullable)
  9982. WriteNullTagLiteral(element, namesp);
  9983. return;
  9984. }
  9985. System.Type type = ob.GetType ();
  9986. if (type == typeof(System.Xml.Schema.XmlSchemaKey))
  9987. { }
  9988. else {
  9989. throw CreateUnknownTypeException (ob);
  9990. }
  9991. if (writeWrappingElem) {
  9992. WriteStartElement (element, namesp, ob);
  9993. }
  9994. if (needType) WriteXsiType("XmlSchemaKey", "http://www.w3.org/2001/XMLSchema");
  9995. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  9996. ICollection o345 = ob.@UnhandledAttributes;
  9997. if (o345 != null) {
  9998. foreach (XmlAttribute o346 in o345)
  9999. if (o346.NamespaceURI != xmlNamespace)
  10000. WriteXmlAttribute (o346, ob);
  10001. }
  10002. WriteAttribute ("id", "", ob.@Id);
  10003. WriteAttribute ("name", "", ob.@Name);
  10004. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10005. WriteObject_XmlSchemaXPath (ob.@Selector, "selector", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10006. if (ob.@Fields != null) {
  10007. for (int n347 = 0; n347 < [email protected]; n347++) {
  10008. WriteObject_XmlSchemaXPath (((System.Xml.Schema.XmlSchemaXPath) ob.@Fields[n347]), "field", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10009. }
  10010. }
  10011. if (writeWrappingElem) WriteEndElement (ob);
  10012. }
  10013. void WriteObject_XmlSchemaUnique (System.Xml.Schema.XmlSchemaUnique ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  10014. {
  10015. if (((object)ob) == null)
  10016. {
  10017. if (isNullable)
  10018. WriteNullTagLiteral(element, namesp);
  10019. return;
  10020. }
  10021. System.Type type = ob.GetType ();
  10022. if (type == typeof(System.Xml.Schema.XmlSchemaUnique))
  10023. { }
  10024. else {
  10025. throw CreateUnknownTypeException (ob);
  10026. }
  10027. if (writeWrappingElem) {
  10028. WriteStartElement (element, namesp, ob);
  10029. }
  10030. if (needType) WriteXsiType("XmlSchemaUnique", "http://www.w3.org/2001/XMLSchema");
  10031. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  10032. ICollection o348 = ob.@UnhandledAttributes;
  10033. if (o348 != null) {
  10034. foreach (XmlAttribute o349 in o348)
  10035. if (o349.NamespaceURI != xmlNamespace)
  10036. WriteXmlAttribute (o349, ob);
  10037. }
  10038. WriteAttribute ("id", "", ob.@Id);
  10039. WriteAttribute ("name", "", ob.@Name);
  10040. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10041. WriteObject_XmlSchemaXPath (ob.@Selector, "selector", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10042. if (ob.@Fields != null) {
  10043. for (int n350 = 0; n350 < [email protected]; n350++) {
  10044. WriteObject_XmlSchemaXPath (((System.Xml.Schema.XmlSchemaXPath) ob.@Fields[n350]), "field", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10045. }
  10046. }
  10047. if (writeWrappingElem) WriteEndElement (ob);
  10048. }
  10049. void WriteObject_XmlSchemaElement (System.Xml.Schema.XmlSchemaElement ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  10050. {
  10051. if (((object)ob) == null)
  10052. {
  10053. if (isNullable)
  10054. WriteNullTagLiteral(element, namesp);
  10055. return;
  10056. }
  10057. System.Type type = ob.GetType ();
  10058. if (type == typeof(System.Xml.Schema.XmlSchemaElement))
  10059. { }
  10060. else {
  10061. throw CreateUnknownTypeException (ob);
  10062. }
  10063. if (writeWrappingElem) {
  10064. WriteStartElement (element, namesp, ob);
  10065. }
  10066. if (needType) WriteXsiType("XmlSchemaElement", "http://www.w3.org/2001/XMLSchema");
  10067. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  10068. ICollection o351 = ob.@UnhandledAttributes;
  10069. if (o351 != null) {
  10070. foreach (XmlAttribute o352 in o351)
  10071. if (o352.NamespaceURI != xmlNamespace)
  10072. WriteXmlAttribute (o352, ob);
  10073. }
  10074. WriteAttribute ("id", "", ob.@Id);
  10075. WriteAttribute ("minOccurs", "", ob.@MinOccursString);
  10076. WriteAttribute ("maxOccurs", "", ob.@MaxOccursString);
  10077. if (ob.@IsAbstract != false) {
  10078. WriteAttribute ("abstract", "", (ob.@IsAbstract?"true":"false"));
  10079. }
  10080. if (ob.@Block != ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None)) {
  10081. WriteAttribute ("block", "", GetEnumValue_XmlSchemaDerivationMethod (ob.@Block));
  10082. }
  10083. if (ob.@DefaultValue != null) {
  10084. WriteAttribute ("default", "", ob.@DefaultValue);
  10085. }
  10086. if (ob.@Final != ((System.Xml.Schema.XmlSchemaDerivationMethod) System.Xml.Schema.XmlSchemaDerivationMethod.None)) {
  10087. WriteAttribute ("final", "", GetEnumValue_XmlSchemaDerivationMethod (ob.@Final));
  10088. }
  10089. if (ob.@FixedValue != null) {
  10090. WriteAttribute ("fixed", "", ob.@FixedValue);
  10091. }
  10092. if (ob.@Form != ((System.Xml.Schema.XmlSchemaForm) System.Xml.Schema.XmlSchemaForm.None)) {
  10093. WriteAttribute ("form", "", GetEnumValue_XmlSchemaForm (ob.@Form));
  10094. }
  10095. if (ob.@Name != "") {
  10096. WriteAttribute ("name", "", ob.@Name);
  10097. }
  10098. if (ob.@IsNillable != false) {
  10099. WriteAttribute ("nillable", "", (ob.@IsNillable?"true":"false"));
  10100. }
  10101. WriteAttribute ("ref", "", FromXmlQualifiedName (ob.@RefName));
  10102. WriteAttribute ("substitutionGroup", "", FromXmlQualifiedName (ob.@SubstitutionGroup));
  10103. WriteAttribute ("type", "", FromXmlQualifiedName (ob.@SchemaTypeName));
  10104. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10105. if (ob.@SchemaType is System.Xml.Schema.XmlSchemaComplexType) {
  10106. WriteObject_XmlSchemaComplexType (((System.Xml.Schema.XmlSchemaComplexType) ob.@SchemaType), "complexType", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10107. }
  10108. else if (ob.@SchemaType is System.Xml.Schema.XmlSchemaSimpleType) {
  10109. WriteObject_XmlSchemaSimpleType (((System.Xml.Schema.XmlSchemaSimpleType) ob.@SchemaType), "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10110. }
  10111. if (ob.@Constraints != null) {
  10112. for (int n353 = 0; n353 < [email protected]; n353++) {
  10113. if (((object)ob.@Constraints[n353]) == null) { }
  10114. else if (ob.@Constraints[n353].GetType() == typeof(System.Xml.Schema.XmlSchemaKeyref)) {
  10115. WriteObject_XmlSchemaKeyref (((System.Xml.Schema.XmlSchemaKeyref) ob.@Constraints[n353]), "keyref", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10116. }
  10117. else if (ob.@Constraints[n353].GetType() == typeof(System.Xml.Schema.XmlSchemaKey)) {
  10118. WriteObject_XmlSchemaKey (((System.Xml.Schema.XmlSchemaKey) ob.@Constraints[n353]), "key", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10119. }
  10120. else if (ob.@Constraints[n353].GetType() == typeof(System.Xml.Schema.XmlSchemaUnique)) {
  10121. WriteObject_XmlSchemaUnique (((System.Xml.Schema.XmlSchemaUnique) ob.@Constraints[n353]), "unique", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10122. }
  10123. else throw CreateUnknownTypeException (ob.@Constraints[n353]);
  10124. }
  10125. }
  10126. if (writeWrappingElem) WriteEndElement (ob);
  10127. }
  10128. void WriteObject_XmlSchemaChoice (System.Xml.Schema.XmlSchemaChoice ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  10129. {
  10130. if (((object)ob) == null)
  10131. {
  10132. if (isNullable)
  10133. WriteNullTagLiteral(element, namesp);
  10134. return;
  10135. }
  10136. System.Type type = ob.GetType ();
  10137. if (type == typeof(System.Xml.Schema.XmlSchemaChoice))
  10138. { }
  10139. else {
  10140. throw CreateUnknownTypeException (ob);
  10141. }
  10142. if (writeWrappingElem) {
  10143. WriteStartElement (element, namesp, ob);
  10144. }
  10145. if (needType) WriteXsiType("XmlSchemaChoice", "http://www.w3.org/2001/XMLSchema");
  10146. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  10147. ICollection o354 = ob.@UnhandledAttributes;
  10148. if (o354 != null) {
  10149. foreach (XmlAttribute o355 in o354)
  10150. if (o355.NamespaceURI != xmlNamespace)
  10151. WriteXmlAttribute (o355, ob);
  10152. }
  10153. WriteAttribute ("id", "", ob.@Id);
  10154. WriteAttribute ("minOccurs", "", ob.@MinOccursString);
  10155. WriteAttribute ("maxOccurs", "", ob.@MaxOccursString);
  10156. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10157. if (ob.@Items != null) {
  10158. for (int n356 = 0; n356 < [email protected]; n356++) {
  10159. if (((object)ob.@Items[n356]) == null) { }
  10160. else if (ob.@Items[n356].GetType() == typeof(System.Xml.Schema.XmlSchemaAny)) {
  10161. WriteObject_XmlSchemaAny (((System.Xml.Schema.XmlSchemaAny) ob.@Items[n356]), "any", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10162. }
  10163. else if (ob.@Items[n356].GetType() == typeof(System.Xml.Schema.XmlSchemaSequence)) {
  10164. WriteObject_XmlSchemaSequence (((System.Xml.Schema.XmlSchemaSequence) ob.@Items[n356]), "sequence", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10165. }
  10166. else if (ob.@Items[n356].GetType() == typeof(System.Xml.Schema.XmlSchemaChoice)) {
  10167. WriteObject_XmlSchemaChoice (((System.Xml.Schema.XmlSchemaChoice) ob.@Items[n356]), "choice", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10168. }
  10169. else if (ob.@Items[n356].GetType() == typeof(System.Xml.Schema.XmlSchemaGroupRef)) {
  10170. WriteObject_XmlSchemaGroupRef (((System.Xml.Schema.XmlSchemaGroupRef) ob.@Items[n356]), "group", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10171. }
  10172. else if (ob.@Items[n356].GetType() == typeof(System.Xml.Schema.XmlSchemaElement)) {
  10173. WriteObject_XmlSchemaElement (((System.Xml.Schema.XmlSchemaElement) ob.@Items[n356]), "element", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10174. }
  10175. else throw CreateUnknownTypeException (ob.@Items[n356]);
  10176. }
  10177. }
  10178. if (writeWrappingElem) WriteEndElement (ob);
  10179. }
  10180. void WriteObject_XmlSchemaSequence (System.Xml.Schema.XmlSchemaSequence ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  10181. {
  10182. if (((object)ob) == null)
  10183. {
  10184. if (isNullable)
  10185. WriteNullTagLiteral(element, namesp);
  10186. return;
  10187. }
  10188. System.Type type = ob.GetType ();
  10189. if (type == typeof(System.Xml.Schema.XmlSchemaSequence))
  10190. { }
  10191. else {
  10192. throw CreateUnknownTypeException (ob);
  10193. }
  10194. if (writeWrappingElem) {
  10195. WriteStartElement (element, namesp, ob);
  10196. }
  10197. if (needType) WriteXsiType("XmlSchemaSequence", "http://www.w3.org/2001/XMLSchema");
  10198. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  10199. ICollection o357 = ob.@UnhandledAttributes;
  10200. if (o357 != null) {
  10201. foreach (XmlAttribute o358 in o357)
  10202. if (o358.NamespaceURI != xmlNamespace)
  10203. WriteXmlAttribute (o358, ob);
  10204. }
  10205. WriteAttribute ("id", "", ob.@Id);
  10206. WriteAttribute ("minOccurs", "", ob.@MinOccursString);
  10207. WriteAttribute ("maxOccurs", "", ob.@MaxOccursString);
  10208. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10209. if (ob.@Items != null) {
  10210. for (int n359 = 0; n359 < [email protected]; n359++) {
  10211. if (((object)ob.@Items[n359]) == null) { }
  10212. else if (ob.@Items[n359].GetType() == typeof(System.Xml.Schema.XmlSchemaAny)) {
  10213. WriteObject_XmlSchemaAny (((System.Xml.Schema.XmlSchemaAny) ob.@Items[n359]), "any", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10214. }
  10215. else if (ob.@Items[n359].GetType() == typeof(System.Xml.Schema.XmlSchemaSequence)) {
  10216. WriteObject_XmlSchemaSequence (((System.Xml.Schema.XmlSchemaSequence) ob.@Items[n359]), "sequence", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10217. }
  10218. else if (ob.@Items[n359].GetType() == typeof(System.Xml.Schema.XmlSchemaChoice)) {
  10219. WriteObject_XmlSchemaChoice (((System.Xml.Schema.XmlSchemaChoice) ob.@Items[n359]), "choice", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10220. }
  10221. else if (ob.@Items[n359].GetType() == typeof(System.Xml.Schema.XmlSchemaGroupRef)) {
  10222. WriteObject_XmlSchemaGroupRef (((System.Xml.Schema.XmlSchemaGroupRef) ob.@Items[n359]), "group", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10223. }
  10224. else if (ob.@Items[n359].GetType() == typeof(System.Xml.Schema.XmlSchemaElement)) {
  10225. WriteObject_XmlSchemaElement (((System.Xml.Schema.XmlSchemaElement) ob.@Items[n359]), "element", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10226. }
  10227. else throw CreateUnknownTypeException (ob.@Items[n359]);
  10228. }
  10229. }
  10230. if (writeWrappingElem) WriteEndElement (ob);
  10231. }
  10232. void WriteObject_XmlSchemaGroup (System.Xml.Schema.XmlSchemaGroup ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  10233. {
  10234. if (((object)ob) == null)
  10235. {
  10236. if (isNullable)
  10237. WriteNullTagLiteral(element, namesp);
  10238. return;
  10239. }
  10240. System.Type type = ob.GetType ();
  10241. if (type == typeof(System.Xml.Schema.XmlSchemaGroup))
  10242. { }
  10243. else {
  10244. throw CreateUnknownTypeException (ob);
  10245. }
  10246. if (writeWrappingElem) {
  10247. WriteStartElement (element, namesp, ob);
  10248. }
  10249. if (needType) WriteXsiType("XmlSchemaGroup", "http://www.w3.org/2001/XMLSchema");
  10250. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  10251. ICollection o360 = ob.@UnhandledAttributes;
  10252. if (o360 != null) {
  10253. foreach (XmlAttribute o361 in o360)
  10254. if (o361.NamespaceURI != xmlNamespace)
  10255. WriteXmlAttribute (o361, ob);
  10256. }
  10257. WriteAttribute ("id", "", ob.@Id);
  10258. WriteAttribute ("name", "", ob.@Name);
  10259. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10260. if (ob.@Particle is System.Xml.Schema.XmlSchemaSequence) {
  10261. WriteObject_XmlSchemaSequence (((System.Xml.Schema.XmlSchemaSequence) ob.@Particle), "sequence", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10262. }
  10263. else if (ob.@Particle is System.Xml.Schema.XmlSchemaChoice) {
  10264. WriteObject_XmlSchemaChoice (((System.Xml.Schema.XmlSchemaChoice) ob.@Particle), "choice", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10265. }
  10266. else if (ob.@Particle is System.Xml.Schema.XmlSchemaAll) {
  10267. WriteObject_XmlSchemaAll (((System.Xml.Schema.XmlSchemaAll) ob.@Particle), "all", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10268. }
  10269. if (writeWrappingElem) WriteEndElement (ob);
  10270. }
  10271. void WriteObject_XmlSchemaRedefine (System.Xml.Schema.XmlSchemaRedefine ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  10272. {
  10273. if (((object)ob) == null)
  10274. {
  10275. if (isNullable)
  10276. WriteNullTagLiteral(element, namesp);
  10277. return;
  10278. }
  10279. System.Type type = ob.GetType ();
  10280. if (type == typeof(System.Xml.Schema.XmlSchemaRedefine))
  10281. { }
  10282. else {
  10283. throw CreateUnknownTypeException (ob);
  10284. }
  10285. if (writeWrappingElem) {
  10286. WriteStartElement (element, namesp, ob);
  10287. }
  10288. if (needType) WriteXsiType("XmlSchemaRedefine", "http://www.w3.org/2001/XMLSchema");
  10289. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  10290. ICollection o362 = ob.@UnhandledAttributes;
  10291. if (o362 != null) {
  10292. foreach (XmlAttribute o363 in o362)
  10293. if (o363.NamespaceURI != xmlNamespace)
  10294. WriteXmlAttribute (o363, ob);
  10295. }
  10296. WriteAttribute ("schemaLocation", "", ((ob.@SchemaLocation != null) ? (ob.@SchemaLocation).ToString() : null));
  10297. WriteAttribute ("id", "", ob.@Id);
  10298. if (ob.@Items != null) {
  10299. for (int n364 = 0; n364 < [email protected]; n364++) {
  10300. if (((object)ob.@Items[n364]) == null) { }
  10301. else if (ob.@Items[n364].GetType() == typeof(System.Xml.Schema.XmlSchemaAttributeGroup)) {
  10302. WriteObject_XmlSchemaAttributeGroup (((System.Xml.Schema.XmlSchemaAttributeGroup) ob.@Items[n364]), "attributeGroup", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10303. }
  10304. else if (ob.@Items[n364].GetType() == typeof(System.Xml.Schema.XmlSchemaGroup)) {
  10305. WriteObject_XmlSchemaGroup (((System.Xml.Schema.XmlSchemaGroup) ob.@Items[n364]), "group", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10306. }
  10307. else if (ob.@Items[n364].GetType() == typeof(System.Xml.Schema.XmlSchemaComplexType)) {
  10308. WriteObject_XmlSchemaComplexType (((System.Xml.Schema.XmlSchemaComplexType) ob.@Items[n364]), "complexType", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10309. }
  10310. else if (ob.@Items[n364].GetType() == typeof(System.Xml.Schema.XmlSchemaSimpleType)) {
  10311. WriteObject_XmlSchemaSimpleType (((System.Xml.Schema.XmlSchemaSimpleType) ob.@Items[n364]), "simpleType", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10312. }
  10313. else if (ob.@Items[n364].GetType() == typeof(System.Xml.Schema.XmlSchemaAnnotation)) {
  10314. WriteObject_XmlSchemaAnnotation (((System.Xml.Schema.XmlSchemaAnnotation) ob.@Items[n364]), "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10315. }
  10316. else throw CreateUnknownTypeException (ob.@Items[n364]);
  10317. }
  10318. }
  10319. if (writeWrappingElem) WriteEndElement (ob);
  10320. }
  10321. void WriteObject_XmlSchemaImport (System.Xml.Schema.XmlSchemaImport ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  10322. {
  10323. if (((object)ob) == null)
  10324. {
  10325. if (isNullable)
  10326. WriteNullTagLiteral(element, namesp);
  10327. return;
  10328. }
  10329. System.Type type = ob.GetType ();
  10330. if (type == typeof(System.Xml.Schema.XmlSchemaImport))
  10331. { }
  10332. else {
  10333. throw CreateUnknownTypeException (ob);
  10334. }
  10335. if (writeWrappingElem) {
  10336. WriteStartElement (element, namesp, ob);
  10337. }
  10338. if (needType) WriteXsiType("XmlSchemaImport", "http://www.w3.org/2001/XMLSchema");
  10339. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  10340. ICollection o365 = ob.@UnhandledAttributes;
  10341. if (o365 != null) {
  10342. foreach (XmlAttribute o366 in o365)
  10343. if (o366.NamespaceURI != xmlNamespace)
  10344. WriteXmlAttribute (o366, ob);
  10345. }
  10346. WriteAttribute ("schemaLocation", "", ((ob.@SchemaLocation != null) ? (ob.@SchemaLocation).ToString() : null));
  10347. WriteAttribute ("id", "", ob.@Id);
  10348. WriteAttribute ("namespace", "", ((ob.@Namespace != null) ? (ob.@Namespace).ToString() : null));
  10349. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10350. if (writeWrappingElem) WriteEndElement (ob);
  10351. }
  10352. void WriteObject_XmlSchemaInclude (System.Xml.Schema.XmlSchemaInclude ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  10353. {
  10354. if (((object)ob) == null)
  10355. {
  10356. if (isNullable)
  10357. WriteNullTagLiteral(element, namesp);
  10358. return;
  10359. }
  10360. System.Type type = ob.GetType ();
  10361. if (type == typeof(System.Xml.Schema.XmlSchemaInclude))
  10362. { }
  10363. else {
  10364. throw CreateUnknownTypeException (ob);
  10365. }
  10366. if (writeWrappingElem) {
  10367. WriteStartElement (element, namesp, ob);
  10368. }
  10369. if (needType) WriteXsiType("XmlSchemaInclude", "http://www.w3.org/2001/XMLSchema");
  10370. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  10371. ICollection o367 = ob.@UnhandledAttributes;
  10372. if (o367 != null) {
  10373. foreach (XmlAttribute o368 in o367)
  10374. if (o368.NamespaceURI != xmlNamespace)
  10375. WriteXmlAttribute (o368, ob);
  10376. }
  10377. WriteAttribute ("schemaLocation", "", ((ob.@SchemaLocation != null) ? (ob.@SchemaLocation).ToString() : null));
  10378. WriteAttribute ("id", "", ob.@Id);
  10379. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10380. if (writeWrappingElem) WriteEndElement (ob);
  10381. }
  10382. void WriteObject_XmlSchemaNotation (System.Xml.Schema.XmlSchemaNotation ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  10383. {
  10384. if (((object)ob) == null)
  10385. {
  10386. if (isNullable)
  10387. WriteNullTagLiteral(element, namesp);
  10388. return;
  10389. }
  10390. System.Type type = ob.GetType ();
  10391. if (type == typeof(System.Xml.Schema.XmlSchemaNotation))
  10392. { }
  10393. else {
  10394. throw CreateUnknownTypeException (ob);
  10395. }
  10396. if (writeWrappingElem) {
  10397. WriteStartElement (element, namesp, ob);
  10398. }
  10399. if (needType) WriteXsiType("XmlSchemaNotation", "http://www.w3.org/2001/XMLSchema");
  10400. WriteNamespaceDeclarations ((XmlSerializerNamespaces) ob.@Namespaces);
  10401. ICollection o369 = ob.@UnhandledAttributes;
  10402. if (o369 != null) {
  10403. foreach (XmlAttribute o370 in o369)
  10404. if (o370.NamespaceURI != xmlNamespace)
  10405. WriteXmlAttribute (o370, ob);
  10406. }
  10407. WriteAttribute ("id", "", ob.@Id);
  10408. WriteAttribute ("name", "", ob.@Name);
  10409. WriteAttribute ("public", "", ob.@Public);
  10410. WriteAttribute ("system", "", ob.@System);
  10411. WriteObject_XmlSchemaAnnotation (ob.@Annotation, "annotation", "http://www.w3.org/2001/XMLSchema", false, false, true);
  10412. if (writeWrappingElem) WriteEndElement (ob);
  10413. }
  10414. void WriteObject_OperationMessage (System.Web.Services.Description.OperationMessage ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  10415. {
  10416. if (((object)ob) == null)
  10417. {
  10418. if (isNullable)
  10419. WriteNullTagLiteral(element, namesp);
  10420. return;
  10421. }
  10422. System.Type type = ob.GetType ();
  10423. if (type == typeof(System.Web.Services.Description.OperationMessage))
  10424. { }
  10425. else if (type == typeof(System.Web.Services.Description.OperationFault)) {
  10426. WriteObject_OperationFault((System.Web.Services.Description.OperationFault)ob, element, namesp, isNullable, true, writeWrappingElem);
  10427. return;
  10428. }
  10429. else if (type == typeof(System.Web.Services.Description.OperationInput)) {
  10430. WriteObject_OperationInput((System.Web.Services.Description.OperationInput)ob, element, namesp, isNullable, true, writeWrappingElem);
  10431. return;
  10432. }
  10433. else if (type == typeof(System.Web.Services.Description.OperationOutput)) {
  10434. WriteObject_OperationOutput((System.Web.Services.Description.OperationOutput)ob, element, namesp, isNullable, true, writeWrappingElem);
  10435. return;
  10436. }
  10437. else {
  10438. throw CreateUnknownTypeException (ob);
  10439. }
  10440. if (writeWrappingElem) {
  10441. WriteStartElement (element, namesp, ob);
  10442. }
  10443. if (needType) WriteXsiType("OperationMessage", "http://schemas.xmlsoap.org/wsdl/");
  10444. WriteAttribute ("message", "", FromXmlQualifiedName (ob.@Message));
  10445. WriteAttribute ("name", "", ob.@Name);
  10446. if (ob.@DocumentationElement != null) {
  10447. XmlNode o371 = ob.@DocumentationElement;
  10448. if (o371 is XmlElement) {
  10449. if ((o371.Name == "documentation" && o371.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
  10450. }
  10451. else o371.WriteTo (Writer);
  10452. WriteElementLiteral (o371, "", "", false, true);
  10453. }
  10454. else
  10455. throw CreateUnknownAnyElementException (o371.Name, o371.NamespaceURI);
  10456. }
  10457. if (writeWrappingElem) WriteEndElement (ob);
  10458. }
  10459. void WriteObject_ArrayOfAnyType (System.Web.Services.Description.ServiceDescriptionFormatExtensionCollection ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  10460. {
  10461. if (((object)ob) == null)
  10462. {
  10463. if (isNullable)
  10464. WriteNullTagLiteral(element, namesp);
  10465. return;
  10466. }
  10467. System.Type type = ob.GetType ();
  10468. if (type == typeof(System.Web.Services.Description.ServiceDescriptionFormatExtensionCollection))
  10469. { }
  10470. else {
  10471. throw CreateUnknownTypeException (ob);
  10472. }
  10473. if (writeWrappingElem) {
  10474. WriteStartElement (element, namesp, ob);
  10475. }
  10476. if (needType) WriteXsiType("ArrayOfAnyType", "http://schemas.xmlsoap.org/wsdl/");
  10477. for (int n372 = 0; n372 < ob.Count; n372++) {
  10478. WriteObject_anyType (ob[n372], "anyType", "http://schemas.xmlsoap.org/wsdl/", true, false, true);
  10479. }
  10480. if (writeWrappingElem) WriteEndElement (ob);
  10481. }
  10482. void WriteObject_MessageBinding (System.Web.Services.Description.MessageBinding ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)
  10483. {
  10484. if (((object)ob) == null)
  10485. {
  10486. if (isNullable)
  10487. WriteNullTagLiteral(element, namesp);
  10488. return;
  10489. }
  10490. System.Type type = ob.GetType ();
  10491. if (type == typeof(System.Web.Services.Description.MessageBinding))
  10492. { }
  10493. else if (type == typeof(System.Web.Services.Description.FaultBinding)) {
  10494. WriteObject_FaultBinding((System.Web.Services.Description.FaultBinding)ob, element, namesp, isNullable, true, writeWrappingElem);
  10495. return;
  10496. }
  10497. else if (type == typeof(System.Web.Services.Description.InputBinding)) {
  10498. WriteObject_InputBinding((System.Web.Services.Description.InputBinding)ob, element, namesp, isNullable, true, writeWrappingElem);
  10499. return;
  10500. }
  10501. else if (type == typeof(System.Web.Services.Description.OutputBinding)) {
  10502. WriteObject_OutputBinding((System.Web.Services.Description.OutputBinding)ob, element, namesp, isNullable, true, writeWrappingElem);
  10503. return;
  10504. }
  10505. else {
  10506. throw CreateUnknownTypeException (ob);
  10507. }
  10508. if (writeWrappingElem) {
  10509. WriteStartElement (element, namesp, ob);
  10510. }
  10511. if (needType) WriteXsiType("MessageBinding", "http://schemas.xmlsoap.org/wsdl/");
  10512. WriteAttribute ("name", "", ob.@Name);
  10513. if (ob.@DocumentationElement != null) {
  10514. XmlNode o373 = ob.@DocumentationElement;
  10515. if (o373 is XmlElement) {
  10516. if ((o373.Name == "documentation" && o373.NamespaceURI == "http://schemas.xmlsoap.org/wsdl/")) {
  10517. }
  10518. else o373.WriteTo (Writer);
  10519. WriteElementLiteral (o373, "", "", false, true);
  10520. }
  10521. else
  10522. throw CreateUnknownAnyElementException (o373.Name, o373.NamespaceURI);
  10523. }
  10524. if (ob.@Extensions != null) {
  10525. WriteStartElement ("Extensions", "http://schemas.xmlsoap.org/wsdl/", ob.@Extensions);
  10526. for (int n374 = 0; n374 < [email protected]; n374++) {
  10527. WriteObject_anyType (ob.@Extensions[n374], "anyType", "http://schemas.xmlsoap.org/wsdl/", true, false, true);
  10528. }
  10529. WriteEndElement (ob.@Extensions);
  10530. }
  10531. if (writeWrappingElem) WriteEndElement (ob);
  10532. }
  10533. protected override void InitCallbacks ()
  10534. {
  10535. }
  10536. }
  10537. }