Advertisement
Guest User

Generated code

a guest
Nov 16th, 2013
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.21 KB | None | 0 0
  1. .Lambda #Lambda1<Marlee.Internal.DeserializeHandler`1[Marlee.Benchmarks.Customer]>(
  2. System.Int32& $start,
  3. System.String $str) {
  4. .Block(
  5. Marlee.Benchmarks.Customer $newCustomer,
  6. System.Int32 $end,
  7. System.Int32 $i,
  8. System.Int32 $len,
  9. System.Char $c,
  10. System.Int32 $whitespace,
  11. System.Int32 $hashValue) {
  12. $newCustomer = .New Marlee.Benchmarks.Customer();
  13. $i = $start;
  14. $len = $str.Length;
  15. .Loop {
  16. .If ($i < $len) {
  17. .Block() {
  18. $c = $str.Chars[$i];
  19. .If (
  20. .Call Marlee.Internal.StandardFunctions.IgnoreChar($c)
  21. ) {
  22. .Block() {
  23. ++$i;
  24. .Continue continue { }
  25. }
  26. } .Else {
  27. .Default(System.Void)
  28. };
  29. .Switch ($c) {
  30. .Case (','):
  31. .Case ('{'):
  32. .Block() {
  33. ++$i;
  34. .Continue continue { }
  35. }
  36. .Case ('}'):
  37. .Block() {
  38. $start = ++$i;
  39. .Return return { }
  40. }
  41. };
  42. $end = -1;
  43. $whitespace = 0;
  44. .Block(System.Int32 $j) {
  45. $j = $i;
  46. .Loop {
  47. .If ($j < $len) {
  48. .Block() {
  49. $c = $str.Chars[$j];
  50. .If (
  51. .Call Marlee.Internal.StandardFunctions.IgnoreChar($c)
  52. ) {
  53. $whitespace++
  54. } .Else {
  55. .If ($c == ':') {
  56. .Block() {
  57. $end = $j;
  58. .Break #Label1 { }
  59. }
  60. } .Else {
  61. .Default(System.Void)
  62. }
  63. };
  64. $j++
  65. }
  66. } .Else {
  67. .Break #Label1 { }
  68. }
  69. }
  70. .LabelTarget #Label1:
  71. };
  72. .If ($end < 0) {
  73. .Throw .New System.InvalidOperationException("Expected a property, but encountered none.")
  74. } .Else {
  75. .Default(System.Void)
  76. };
  77. $hashValue = .Call Marlee.Internal.MemberHashHelper.HashOne(
  78. $str,
  79. $i,
  80. $end - $whitespace);
  81. $i = $end + 1;
  82. .Switch ($hashValue) {
  83. .Case (5549):
  84. .Block() {
  85. $newCustomer.Name = .Call Marlee.Internal.StandardFunctions.ExtractString(
  86. $i,
  87. $str);
  88. .Default(System.Void)
  89. }
  90. .Case (4371):
  91. .Block() {
  92. $newCustomer.ID = .Call Marlee.Internal.StandardFunctions.ExtractInt32(
  93. $i,
  94. $str);
  95. .Default(System.Void)
  96. }
  97. .Case (6107):
  98. .Block() {
  99. $newCustomer.Roles = .Call Marlee.Internal.StandardFunctions.ExtractStringCollection(
  100. $i,
  101. $str,
  102. .New System.Collections.Generic.List`1[System.String]());
  103. .Default(System.Void)
  104. }
  105. .Case (5580):
  106. .Block() {
  107. $newCustomer.Address = .Call DeserializeAddress_fe4edc2d02c34437a21b7f4179520a9d.Deserialize(
  108. $i,
  109. $str);
  110. .Default(System.Void)
  111. }
  112. .Case (6076):
  113. .Block() {
  114. $newCustomer.Parent = .Invoke (Marlee.Jsv.Deserialization.DeserializerStore`1[Marlee.Benchmarks.Customer].Function)(
  115. $i,
  116. $str);
  117. .Default(System.Void)
  118. }
  119. .Case (5301):
  120. .Block() {
  121. $newCustomer.FirstName = .Call Marlee.Internal.StandardFunctions.ExtractString(
  122. $i,
  123. $str);
  124. .Default(System.Void)
  125. }
  126. .Case (5487):
  127. .Block() {
  128. $newCustomer.LastName = .Call Marlee.Internal.StandardFunctions.ExtractString(
  129. $i,
  130. $str);
  131. .Default(System.Void)
  132. }
  133. .Case (5146):
  134. .Block() {
  135. $newCustomer.Age = .Call Marlee.Internal.StandardFunctions.ExtractInt32(
  136. $i,
  137. $str);
  138. .Default(System.Void)
  139. }
  140. .Case (6014):
  141. .Block() {
  142. $newCustomer.OrganizationUnitIDs = .Call Marlee.Internal.StandardFunctions.ExtractInt32Collection(
  143. $i,
  144. $str,
  145. .New System.Collections.Generic.List`1[System.Int32]());
  146. .Default(System.Void)
  147. }
  148. .Default:
  149. .Call Marlee.Internal.StandardFunctions.Skip(
  150. $i,
  151. $str)
  152. };
  153. .Label
  154. .LabelTarget continue:
  155. }
  156. } .Else {
  157. .Break break { }
  158. }
  159. }
  160. .LabelTarget break:;
  161. .Label
  162. .LabelTarget return:;
  163. $newCustomer
  164. }
  165. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement