Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

748 lines
16 KiB

  1. using System;
  2. using System.Collections;
  3. using System.Diagnostics;
  4. using System.ComponentModel;
  5. using System.Xml.Serialization;
  6. using Microsoft.Uddi;
  7. using Microsoft.Uddi.Business;
  8. using Microsoft.Uddi.Service;
  9. using Microsoft.Uddi.ServiceType;
  10. using Microsoft.Uddi.VersionSupport;
  11. namespace Microsoft.Uddi.Business
  12. {
  13. [XmlRoot( "assertionStatusReport", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace )]
  14. public class AssertionStatusReport : UddiCore
  15. {
  16. private string node;
  17. private AssertionStatusItemCollection assertionStatusItems;
  18. [XmlAttribute( "operator" )]
  19. public string Operator
  20. {
  21. get { return node; }
  22. set { node = value; }
  23. }
  24. [XmlElement( "assertionStatusItem" )]
  25. public AssertionStatusItemCollection AssertionStatusItems
  26. {
  27. get
  28. {
  29. if( null == assertionStatusItems )
  30. {
  31. assertionStatusItems = new AssertionStatusItemCollection();
  32. }
  33. return assertionStatusItems;
  34. }
  35. set { assertionStatusItems = value; }
  36. }
  37. }
  38. [XmlRoot( "publisherAssertions", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace )]
  39. public class PublisherAssertionDetail : UddiCore
  40. {
  41. private string node;
  42. private string authorizedName;
  43. private PublisherAssertionCollection publisherAssertions;
  44. [XmlAttribute( "operator" )]
  45. public string Operator
  46. {
  47. get { return node; }
  48. set { node = value; }
  49. }
  50. [XmlAttribute( "authorizedName" )]
  51. public string AuthorizedName
  52. {
  53. get { return authorizedName; }
  54. set { authorizedName = value; }
  55. }
  56. [XmlElement( "publisherAssertion" )]
  57. public PublisherAssertionCollection PublisherAssertions
  58. {
  59. get
  60. {
  61. if( null == publisherAssertions )
  62. {
  63. publisherAssertions = new PublisherAssertionCollection();
  64. }
  65. return publisherAssertions;
  66. }
  67. set { publisherAssertions = value; }
  68. }
  69. }
  70. [XmlRoot( "relatedBusinessesList", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace )]
  71. public class RelatedBusinessList : UddiCore
  72. {
  73. private string operatorValue;
  74. private string businessKey;
  75. private bool truncated;
  76. private RelatedBusinessInfoCollection relatedBusinessInfos;
  77. [XmlAttribute( "operator" )]
  78. public string Operator
  79. {
  80. get { return operatorValue; }
  81. set { operatorValue = value; }
  82. }
  83. [XmlAttribute( "businessKey" )]
  84. public string BusinessKey
  85. {
  86. get { return businessKey; }
  87. set { businessKey = value; }
  88. }
  89. [XmlAttribute( "truncated" )]
  90. public bool Truncated
  91. {
  92. get { return truncated; }
  93. set { truncated = value; }
  94. }
  95. [ XmlArray( "relatedBusinessInfos" ), XmlArrayItem( "relatedBusinessInfo" ) ]
  96. public RelatedBusinessInfoCollection RelatedBusinessInfos
  97. {
  98. get
  99. {
  100. if( null == relatedBusinessInfos )
  101. {
  102. relatedBusinessInfos = new RelatedBusinessInfoCollection();
  103. }
  104. return relatedBusinessInfos;
  105. }
  106. set { relatedBusinessInfos = value; }
  107. }
  108. }
  109. [XmlRoot( "add_publisherAssertions", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace )]
  110. public class AddPublisherAssertions : UddiSecureMessage
  111. {
  112. private PublisherAssertionCollection publisherAssertions;
  113. [XmlElement( "publisherAssertion" )]
  114. public PublisherAssertionCollection PublisherAssertions
  115. {
  116. get
  117. {
  118. if( null == publisherAssertions )
  119. {
  120. publisherAssertions = new PublisherAssertionCollection();
  121. }
  122. return publisherAssertions;
  123. }
  124. set { publisherAssertions = value; }
  125. }
  126. }
  127. [XmlRoot( "delete_publisherAssertions", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace )]
  128. public class DeletePublisherAssertions : UddiSecureMessage
  129. {
  130. private PublisherAssertionCollection publisherAssertions;
  131. [XmlElement( "publisherAssertion" )]
  132. public PublisherAssertionCollection PublisherAssertions
  133. {
  134. get
  135. {
  136. if( null == publisherAssertions )
  137. {
  138. publisherAssertions = new PublisherAssertionCollection();
  139. }
  140. return publisherAssertions;
  141. }
  142. set { publisherAssertions = value; }
  143. }
  144. }
  145. [XmlRoot( "find_relatedBusinesses", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace )]
  146. public class FindRelatedBusinesses : UddiQueryMessage
  147. {
  148. //
  149. // TODO this normally does not have max rows default 0, is that going to be a problem?
  150. //
  151. private string businessKey;
  152. private KeyedReference keyedReference;
  153. [XmlElement( "businessKey" )]
  154. public string BusinessKey
  155. {
  156. get { return businessKey; }
  157. set { businessKey = value; }
  158. }
  159. [XmlElement( "keyedReference" )]
  160. public KeyedReference KeyedReference
  161. {
  162. get
  163. {
  164. if( null == keyedReference )
  165. {
  166. keyedReference = new KeyedReference();
  167. }
  168. return keyedReference;
  169. }
  170. set { keyedReference = value; }
  171. }
  172. }
  173. [XmlRoot( "get_assertionStatusReport", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace )]
  174. public class GetAssertionStatusReport : UddiSecureMessage
  175. {
  176. private CompletionStatusType completionStatus;
  177. [XmlElement( "completionStatus" )]
  178. public CompletionStatusType CompletionStatus
  179. {
  180. get { return completionStatus; }
  181. set { completionStatus = value; }
  182. }
  183. }
  184. [XmlRoot( "get_publisherAssertions", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace )]
  185. public class GetPublisherAssertions : UddiSecureMessage
  186. {
  187. }
  188. [XmlRoot( "set_publisherAssertions", Namespace=Microsoft.Uddi.VersionSupport.UddiVersionSupport.CurrentNamespace )]
  189. public class SetPublisherAssertions : UddiSecureMessage
  190. {
  191. private PublisherAssertionCollection publisherAssertions;
  192. [XmlElement( "publisherAssertion" )]
  193. public PublisherAssertionCollection PublisherAssertions
  194. {
  195. get
  196. {
  197. if( null == publisherAssertions )
  198. {
  199. publisherAssertions = new PublisherAssertionCollection();
  200. }
  201. return publisherAssertions;
  202. }
  203. set { publisherAssertions = value; }
  204. }
  205. }
  206. public class PublisherAssertion : UddiCore
  207. {
  208. private string fromKey;
  209. private string toKey;
  210. private KeyedReference keyedReference;
  211. public PublisherAssertion()
  212. {}
  213. public PublisherAssertion( PublisherAssertion assertion )
  214. {
  215. this.FromKey = assertion.FromKey;
  216. this.ToKey = assertion.ToKey;
  217. this.KeyedReference = assertion.KeyedReference;
  218. }
  219. public PublisherAssertion( string fromKey, string toKey, KeyedReference keyedReference )
  220. {
  221. this.FromKey = fromKey;
  222. this.ToKey = toKey;
  223. this.KeyedReference = keyedReference;
  224. }
  225. public PublisherAssertion( string fromKey, string toKey, string keyName, string keyValue, string tModelKey )
  226. {
  227. this.FromKey = fromKey;
  228. this.ToKey = toKey;
  229. this.KeyedReference = new KeyedReference( keyName, keyValue, tModelKey );
  230. }
  231. [XmlElement( "fromKey" )]
  232. public string FromKey
  233. {
  234. get { return fromKey; }
  235. set { fromKey = value; }
  236. }
  237. [XmlElement( "toKey" )]
  238. public string ToKey
  239. {
  240. get { return toKey; }
  241. set { toKey = value; }
  242. }
  243. [XmlElement( "keyedReference" )]
  244. public KeyedReference KeyedReference
  245. {
  246. get
  247. {
  248. if( null == keyedReference )
  249. {
  250. keyedReference = new KeyedReference();
  251. }
  252. return keyedReference;
  253. }
  254. set { keyedReference = value; }
  255. }
  256. }
  257. public class AssertionStatusItem : UddiCore
  258. {
  259. private string fromKey;
  260. private string toKey;
  261. private CompletionStatusType completionStatus;
  262. private KeyedReference keyedReference;
  263. private KeysOwned keysOwned;
  264. public AssertionStatusItem()
  265. {}
  266. public AssertionStatusItem( CompletionStatusType completionStatus,
  267. string fromKey,
  268. string toKey,
  269. KeyedReference keyedReference,
  270. KeysOwned keysOwned )
  271. {
  272. this.CompletionStatus = completionStatus;
  273. this.FromKey = fromKey;
  274. this.ToKey = toKey;
  275. this.KeyedReference = keyedReference;
  276. this.KeysOwned = keysOwned;
  277. }
  278. [XmlAttribute( "completionStatus" )]
  279. public CompletionStatusType CompletionStatus
  280. {
  281. get { return completionStatus; }
  282. set { completionStatus = value; }
  283. }
  284. [XmlElement( "fromKey" )]
  285. public string FromKey
  286. {
  287. get { return fromKey; }
  288. set { fromKey = value; }
  289. }
  290. [XmlElement( "toKey" )]
  291. public string ToKey
  292. {
  293. get { return toKey; }
  294. set { toKey = value; }
  295. }
  296. [XmlElement( "keyedReference" )]
  297. public KeyedReference KeyedReference
  298. {
  299. get { return keyedReference; }
  300. set { keyedReference = value; }
  301. }
  302. [XmlElement( "keysOwned" )]
  303. public KeysOwned KeysOwned
  304. {
  305. get
  306. {
  307. if( null == keysOwned )
  308. {
  309. keysOwned = new KeysOwned();
  310. }
  311. return keysOwned;
  312. }
  313. set { keysOwned = value; }
  314. }
  315. }
  316. public class KeysOwned : UddiCore
  317. {
  318. private string fromKey;
  319. private string toKey;
  320. public KeysOwned()
  321. {}
  322. public KeysOwned( string fromKey, string toKey )
  323. {
  324. this.FromKey = fromKey;
  325. this.ToKey = toKey;
  326. }
  327. [XmlElement( "fromKey" )]
  328. public string FromKey
  329. {
  330. get { return fromKey; }
  331. set { fromKey = value; }
  332. }
  333. [XmlElement( "toKey" )]
  334. public string ToKey
  335. {
  336. get { return toKey; }
  337. set { toKey = value; }
  338. }
  339. }
  340. public class RelatedBusinessInfo : UddiCore
  341. {
  342. private string businessKey;
  343. private NameCollection names;
  344. private DescriptionCollection descriptions;
  345. private SharedRelationships[] sharedRelationships;
  346. public RelatedBusinessInfo()
  347. {}
  348. public RelatedBusinessInfo( string businessKey )
  349. {
  350. this.BusinessKey = businessKey;
  351. }
  352. [XmlElement( "businessKey" )]
  353. public string BusinessKey
  354. {
  355. get { return businessKey; }
  356. set { businessKey = value; }
  357. }
  358. [XmlElement( "name" )]
  359. public NameCollection Names
  360. {
  361. get
  362. {
  363. if( null == names )
  364. {
  365. names = new NameCollection();
  366. }
  367. return names;
  368. }
  369. set { names = value; }
  370. }
  371. [XmlElement( "description" )]
  372. public DescriptionCollection Descriptions
  373. {
  374. get
  375. {
  376. if( null == descriptions )
  377. {
  378. descriptions = new DescriptionCollection();
  379. }
  380. return descriptions;
  381. }
  382. set { descriptions = value; }
  383. }
  384. [XmlElement( "sharedRelationships" )]
  385. public SharedRelationships[] SharedRelationships
  386. {
  387. get
  388. {
  389. if( null == sharedRelationships )
  390. {
  391. sharedRelationships = new SharedRelationships[ 2 ];
  392. }
  393. return sharedRelationships;
  394. }
  395. set { sharedRelationships = value; }
  396. }
  397. }
  398. public class SharedRelationships : UddiCore
  399. {
  400. private DirectionType direction;
  401. private KeyedReferenceCollection keyedReferences;
  402. [XmlAttribute( "direction" )]
  403. public DirectionType Direction
  404. {
  405. get { return direction; }
  406. set { direction = value; }
  407. }
  408. [XmlElement( "keyedReference" )]
  409. public KeyedReferenceCollection KeyedReferencesSerialize
  410. {
  411. get
  412. {
  413. if( null == keyedReferences )
  414. {
  415. keyedReferences = new KeyedReferenceCollection();
  416. }
  417. return keyedReferences;
  418. }
  419. set { keyedReferences = value; }
  420. }
  421. }
  422. public class PublisherAssertionCollection : CollectionBase
  423. {
  424. public PublisherAssertion this[ int index ]
  425. {
  426. get { return (PublisherAssertion)List[index]; }
  427. set { List[ index ] = value; }
  428. }
  429. public int Add()
  430. {
  431. return List.Add( new PublisherAssertion() );
  432. }
  433. public int Add( PublisherAssertion value )
  434. {
  435. return List.Add( value );
  436. }
  437. public int Add( string fromKey, string toKey, KeyedReference keyedReference )
  438. {
  439. return List.Add( new PublisherAssertion( fromKey, toKey, keyedReference ) );
  440. }
  441. public int Add( string fromKey, string toKey, string keyName, string keyValue, string tModelKey )
  442. {
  443. return List.Add( new PublisherAssertion( fromKey, toKey, keyName, keyValue, tModelKey ) );
  444. }
  445. public void Insert( int index, PublisherAssertion value )
  446. {
  447. List.Insert( index, value );
  448. }
  449. public int IndexOf( PublisherAssertion value )
  450. {
  451. return List.IndexOf( value );
  452. }
  453. public bool Contains( PublisherAssertion value )
  454. {
  455. return List.Contains( value );
  456. }
  457. public void Remove( PublisherAssertion value )
  458. {
  459. List.Remove( value );
  460. }
  461. public void CopyTo( PublisherAssertion[] array, int index )
  462. {
  463. List.CopyTo( array, index );
  464. }
  465. public new PublisherAssertionEnumerator GetEnumerator()
  466. {
  467. return new PublisherAssertionEnumerator( List.GetEnumerator() );
  468. }
  469. }
  470. public sealed class PublisherAssertionEnumerator : IEnumerator
  471. {
  472. private IEnumerator enumerator;
  473. public PublisherAssertionEnumerator( IEnumerator enumerator )
  474. {
  475. this.enumerator = enumerator;
  476. }
  477. public PublisherAssertion Current
  478. {
  479. get { return ( PublisherAssertion ) enumerator.Current; }
  480. }
  481. object IEnumerator.Current
  482. {
  483. get{ return enumerator.Current; }
  484. }
  485. public bool MoveNext()
  486. {
  487. return enumerator.MoveNext();
  488. }
  489. public void Reset()
  490. {
  491. enumerator.Reset();
  492. }
  493. }
  494. public class AssertionStatusItemCollection : CollectionBase
  495. {
  496. public AssertionStatusItem this[ int index ]
  497. {
  498. get { return (AssertionStatusItem)List[index]; }
  499. set { List[ index ] = value; }
  500. }
  501. public int Add()
  502. {
  503. return List.Add( new AssertionStatusItem() );
  504. }
  505. public int Add( AssertionStatusItem value )
  506. {
  507. return List.Add( value );
  508. }
  509. public void Insert( int index, AssertionStatusItem value )
  510. {
  511. List.Insert( index, value );
  512. }
  513. public int IndexOf( AssertionStatusItem value )
  514. {
  515. return List.IndexOf( value );
  516. }
  517. public bool Contains( AssertionStatusItem value )
  518. {
  519. return List.Contains( value );
  520. }
  521. public void Remove( AssertionStatusItem value )
  522. {
  523. List.Remove( value );
  524. }
  525. public void CopyTo( AssertionStatusItem[] array, int index )
  526. {
  527. List.CopyTo( array, index );
  528. }
  529. public new AssertionStatusItemEnumerator GetEnumerator()
  530. {
  531. return new AssertionStatusItemEnumerator( List.GetEnumerator() );
  532. }
  533. }
  534. public sealed class AssertionStatusItemEnumerator : IEnumerator
  535. {
  536. private IEnumerator enumerator;
  537. public AssertionStatusItemEnumerator( IEnumerator enumerator )
  538. {
  539. this.enumerator = enumerator;
  540. }
  541. public AssertionStatusItem Current
  542. {
  543. get { return ( AssertionStatusItem ) enumerator.Current; }
  544. }
  545. object IEnumerator.Current
  546. {
  547. get{ return enumerator.Current; }
  548. }
  549. public bool MoveNext()
  550. {
  551. return enumerator.MoveNext();
  552. }
  553. public void Reset()
  554. {
  555. enumerator.Reset();
  556. }
  557. }
  558. public class RelatedBusinessInfoCollection : CollectionBase
  559. {
  560. public RelatedBusinessInfo this[ int index ]
  561. {
  562. get { return (RelatedBusinessInfo)List[index]; }
  563. set { List[ index ] = value; }
  564. }
  565. public int Add( RelatedBusinessInfo relatedBusinessInfo )
  566. {
  567. return List.Add( relatedBusinessInfo );
  568. }
  569. public int Add( string businessKey )
  570. {
  571. return List.Add( new RelatedBusinessInfo( businessKey ) );
  572. }
  573. public void Insert( int index, RelatedBusinessInfo relatedBusinessInfo )
  574. {
  575. List.Insert( index, relatedBusinessInfo );
  576. }
  577. public int IndexOf( RelatedBusinessInfo relatedBusinessInfo )
  578. {
  579. return List.IndexOf( relatedBusinessInfo );
  580. }
  581. public bool Contains( RelatedBusinessInfo relatedBusinessInfo )
  582. {
  583. return List.Contains( relatedBusinessInfo );
  584. }
  585. public void Remove( RelatedBusinessInfo relatedBusinessInfo )
  586. {
  587. List.Remove( relatedBusinessInfo );
  588. }
  589. public void CopyTo( RelatedBusinessInfo[] array, int index )
  590. {
  591. List.CopyTo( array, index );
  592. }
  593. public new RelatedBusinessInfoEnumerator GetEnumerator()
  594. {
  595. return new RelatedBusinessInfoEnumerator( List.GetEnumerator() );
  596. }
  597. }
  598. public sealed class RelatedBusinessInfoEnumerator : IEnumerator
  599. {
  600. private IEnumerator enumerator;
  601. public RelatedBusinessInfoEnumerator( IEnumerator enumerator )
  602. {
  603. this.enumerator = enumerator;
  604. }
  605. public RelatedBusinessInfo Current
  606. {
  607. get { return ( RelatedBusinessInfo ) enumerator.Current; }
  608. }
  609. object IEnumerator.Current
  610. {
  611. get{ return enumerator.Current; }
  612. }
  613. public bool MoveNext()
  614. {
  615. return enumerator.MoveNext();
  616. }
  617. public void Reset()
  618. {
  619. enumerator.Reset();
  620. }
  621. }
  622. }