PageRenderTime 51ms CodeModel.GetById 25ms RepoModel.GetById 1ms app.codeStats 0ms

/Songhay.Data.GenericWeb/Procedures/List/List.FragmentsBySegmentId.cs

http://GenericWeb.codeplex.com
C# | 33 lines | 19 code | 5 blank | 9 comment | 2 complexity | 8d7109992ad928588075afef00ca2ae7 MD5 | raw file
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Data.Common;
  4. namespace Songhay.Data.GenericWeb.Procedures
  5. {
  6. using Songhay.Data.GenericWeb.Properties;
  7. /// <summary>
  8. /// List procedures into the DBMS.
  9. /// </summary>
  10. public static partial class List
  11. {
  12. /// <summary>
  13. /// Lists all fragments associated with the specified Segment.
  14. /// </summary>
  15. /// <param name="commonConnection">The Common connection.</param>
  16. /// <param name="uniqueIdentifier">The unique identifier.</param>
  17. /// <returns>Returns an XML <see cref="System.String"/>.</returns>
  18. public static string FragmentsBySegmentId(DbConnection commonConnection, string uniqueIdentifier)
  19. {
  20. if(uniqueIdentifier == null) throw new ArgumentNullException("uniqueIdentifier", "The unique identifer is null.");
  21. Dictionary<String, Object> paramSet = new Dictionary<string, object>(2);
  22. paramSet.Add("@SegmentId", uniqueIdentifier);
  23. paramSet.Add("@GlobalDateFormat", CommandHandler.GlobalDateFormat);
  24. string s = Common.CommonScalar.GetString(commonConnection, Resources.ListChildFragments, paramSet);
  25. return s;
  26. }
  27. }
  28. }