ProfileParser.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. //
  2. // System.Web.UI.ProfileParser
  3. //
  4. // Authors:
  5. // Vladimir Krasnov ([email protected])
  6. //
  7. //
  8. // Permission is hereby granted, free of charge, to any person obtaining
  9. // a copy of this software and associated documentation files (the
  10. // "Software"), to deal in the Software without restriction, including
  11. // without limitation the rights to use, copy, modify, merge, publish,
  12. // distribute, sublicense, and/or sell copies of the Software, and to
  13. // permit persons to whom the Software is furnished to do so, subject to
  14. // the following conditions:
  15. //
  16. // The above copyright notice and this permission notice shall be
  17. // included in all copies or substantial portions of the Software.
  18. //
  19. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  20. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  21. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  22. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  23. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  24. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  25. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  26. //
  27. using System;
  28. using System.Collections;
  29. using System.IO;
  30. using System.Web;
  31. using System.Web.Compilation;
  32. using System.Web.Util;
  33. namespace System.Web.Profile
  34. {
  35. internal sealed class ProfileParser
  36. {
  37. internal ProfileParser (HttpContext context)
  38. {
  39. }
  40. public static Type GetProfileCommonType (HttpContext context)
  41. {
  42. string typeName;
  43. if (AppCodeCompiler.DefaultAppCodeAssemblyName != null)
  44. typeName = String.Concat ("ProfileCommon, ", AppCodeCompiler.DefaultAppCodeAssemblyName);
  45. else
  46. typeName = "ProfileCommon";
  47. Type profileBaseType = Type.GetType (typeName);
  48. if (profileBaseType == null) {
  49. //Compiler call
  50. }
  51. return profileBaseType;
  52. }
  53. public static Type GetProfileGroupType (HttpContext context, string groupName)
  54. {
  55. string typeName;
  56. if (AppCodeCompiler.DefaultAppCodeAssemblyName != null)
  57. typeName = String.Concat ("ProfileGroup", groupName, ", ", AppCodeCompiler.DefaultAppCodeAssemblyName);
  58. else
  59. typeName = String.Concat ("ProfileGroup", groupName);
  60. Type profileGroupType = Type.GetType (typeName);
  61. if (profileGroupType == null) {
  62. //Compiler call
  63. }
  64. return profileGroupType;
  65. }
  66. }
  67. }