Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .Lambda #Lambda1<Marlee.Internal.DeserializeHandler`1[Marlee.Benchmarks.Customer]>(
- System.Int32& $start,
- System.String $str) {
- .Block(
- Marlee.Benchmarks.Customer $newCustomer,
- System.Int32 $end,
- System.Int32 $i,
- System.Int32 $len,
- System.Char $c,
- System.Int32 $whitespace,
- System.Int32 $hashValue) {
- $newCustomer = .New Marlee.Benchmarks.Customer();
- $i = $start;
- $len = $str.Length;
- .Loop {
- .If ($i < $len) {
- .Block() {
- $c = $str.Chars[$i];
- .If (
- .Call Marlee.Internal.StandardFunctions.IgnoreChar($c)
- ) {
- .Block() {
- ++$i;
- .Continue continue { }
- }
- } .Else {
- .Default(System.Void)
- };
- .Switch ($c) {
- .Case (','):
- .Case ('{'):
- .Block() {
- ++$i;
- .Continue continue { }
- }
- .Case ('}'):
- .Block() {
- $start = ++$i;
- .Return return { }
- }
- };
- $end = -1;
- $whitespace = 0;
- .Block(System.Int32 $j) {
- $j = $i;
- .Loop {
- .If ($j < $len) {
- .Block() {
- $c = $str.Chars[$j];
- .If (
- .Call Marlee.Internal.StandardFunctions.IgnoreChar($c)
- ) {
- $whitespace++
- } .Else {
- .If ($c == ':') {
- .Block() {
- $end = $j;
- .Break #Label1 { }
- }
- } .Else {
- .Default(System.Void)
- }
- };
- $j++
- }
- } .Else {
- .Break #Label1 { }
- }
- }
- .LabelTarget #Label1:
- };
- .If ($end < 0) {
- .Throw .New System.InvalidOperationException("Expected a property, but encountered none.")
- } .Else {
- .Default(System.Void)
- };
- $hashValue = .Call Marlee.Internal.MemberHashHelper.HashOne(
- $str,
- $i,
- $end - $whitespace);
- $i = $end + 1;
- .Switch ($hashValue) {
- .Case (5549):
- .Block() {
- $newCustomer.Name = .Call Marlee.Internal.StandardFunctions.ExtractString(
- $i,
- $str);
- .Default(System.Void)
- }
- .Case (4371):
- .Block() {
- $newCustomer.ID = .Call Marlee.Internal.StandardFunctions.ExtractInt32(
- $i,
- $str);
- .Default(System.Void)
- }
- .Case (6107):
- .Block() {
- $newCustomer.Roles = .Call Marlee.Internal.StandardFunctions.ExtractStringCollection(
- $i,
- $str,
- .New System.Collections.Generic.List`1[System.String]());
- .Default(System.Void)
- }
- .Case (5580):
- .Block() {
- $newCustomer.Address = .Call DeserializeAddress_fe4edc2d02c34437a21b7f4179520a9d.Deserialize(
- $i,
- $str);
- .Default(System.Void)
- }
- .Case (6076):
- .Block() {
- $newCustomer.Parent = .Invoke (Marlee.Jsv.Deserialization.DeserializerStore`1[Marlee.Benchmarks.Customer].Function)(
- $i,
- $str);
- .Default(System.Void)
- }
- .Case (5301):
- .Block() {
- $newCustomer.FirstName = .Call Marlee.Internal.StandardFunctions.ExtractString(
- $i,
- $str);
- .Default(System.Void)
- }
- .Case (5487):
- .Block() {
- $newCustomer.LastName = .Call Marlee.Internal.StandardFunctions.ExtractString(
- $i,
- $str);
- .Default(System.Void)
- }
- .Case (5146):
- .Block() {
- $newCustomer.Age = .Call Marlee.Internal.StandardFunctions.ExtractInt32(
- $i,
- $str);
- .Default(System.Void)
- }
- .Case (6014):
- .Block() {
- $newCustomer.OrganizationUnitIDs = .Call Marlee.Internal.StandardFunctions.ExtractInt32Collection(
- $i,
- $str,
- .New System.Collections.Generic.List`1[System.Int32]());
- .Default(System.Void)
- }
- .Default:
- .Call Marlee.Internal.StandardFunctions.Skip(
- $i,
- $str)
- };
- .Label
- .LabelTarget continue:
- }
- } .Else {
- .Break break { }
- }
- }
- .LabelTarget break:;
- .Label
- .LabelTarget return:;
- $newCustomer
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement