Class not parsed correctly

4 posts, 0 answers
  1. Jonx
    Jonx avatar
    258 posts
    Member since:
    Jul 2012

    Posted 19 Jul 2011 Link to this post

    That IL:
    .class public auto ansi beforefieldinit DevExpress.Xpo.DB.DataStoreService
        extends DevExpress.Xpo.DB.ServiceBase
        implements DevExpress.Xpo.DB.IDataStoreServiceEx,
                   DevExpress.Xpo.DB.IDataStoreService
    {
        .custom instance void [System.ServiceModel]System.ServiceModel.Activation.AspNetCompatibilityRequirementsAttribute::.ctor() = (
            01 00 01 00 54 55 80 9a 53 79 73 74 65 6d 2e 53
            65 72 76 69 63 65 4d 6f 64 65 6c 2e 41 63 74 69
            76 61 74 69 6f 6e 2e 41 73 70 4e 65 74 43 6f 6d
            70 61 74 69 62 69 6c 69 74 79 52 65 71 75 69 72
            65 6d 65 6e 74 73 4d 6f 64 65 2c 20 53 79 73 74
            65 6d 2e 53 65 72 76 69 63 65 4d 6f 64 65 6c 2c
            20 56 65 72 73 69 6f 6e 3d 33 2e 30 2e 30 2e 30
            2c 20 43 75 6c 74 75 72 65 3d 6e 65 75 74 72 61
            6c 2c 20 50 75 62 6c 69 63 4b 65 79 54 6f 6b 65
            6e 3d 62 37 37 61 35 63 35 36 31 39 33 34 65 30
            38 39 10 52 65 71 75 69 72 65 6d 65 6e 74 73 4d
            6f 64 65 01 00 00 00
        )
        .field family initonly class [DevExpress.Data.v11.1]DevExpress.Xpo.Helpers.ICommandChannel commandChannel
     
        .field family class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.IDataStore provider
     
        .method public hidebysig specialname rtspecialname
            instance void .ctor (
                class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.IDataStore provider
            ) cil managed
        {
            IL_0000: ldarg.0
            IL_0001: call instance void DevExpress.Xpo.DB.ServiceBase::.ctor()
            IL_0006: ldarg.0
            IL_0007: ldarg.1
            IL_0008: stfld class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.IDataStore DevExpress.Xpo.DB.DataStoreService::provider
            IL_000d: ldarg.0
            IL_000e: ldarg.1
            IL_000f: isinst [DevExpress.Data.v11.1]DevExpress.Xpo.Helpers.ICommandChannel
            IL_0014: stfld class [DevExpress.Data.v11.1]DevExpress.Xpo.Helpers.ICommandChannel DevExpress.Xpo.DB.DataStoreService::commandChannel
            IL_0019: ret
        }
     
        .method private hidebysig
            instance valuetype [DevExpress.Data.v11.1]DevExpress.Xpo.DB.AutoCreateOption '<GetAutoCreateOption>b__c' () cil managed
        {
            .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = (
                01 00 00 00
            )
            IL_0000: ldarg.0
            IL_0001: ldfld class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.IDataStore DevExpress.Xpo.DB.DataStoreService::provider
            IL_0006: callvirt instance valuetype [DevExpress.Data.v11.1]DevExpress.Xpo.DB.AutoCreateOption [DevExpress.Data.v11.1]DevExpress.Xpo.DB.IDataStore::get_AutoCreateOption()
            IL_000b: ret
        }
     
        .method public hidebysig newslot virtual
            instance class DevExpress.Xpo.DB.OperationResult`1<object> Do (
                string command,
                object args
            ) cil managed
        {
            .locals init (
                [0] class DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClasse' dataStoreService
            )
     
            IL_0000: newobj instance void DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClasse'::.ctor()
            IL_0005: stloc.0
            IL_0006: ldloc.0
            IL_0007: ldarg.1
            IL_0008: stfld string DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClasse'::command
            IL_000d: ldloc.0
            IL_000e: ldarg.2
            IL_000f: stfld object DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClasse'::args
            IL_0014: ldloc.0
            IL_0015: ldarg.0
            IL_0016: stfld class DevExpress.Xpo.DB.DataStoreService DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClasse'::'<>4__this'
            IL_001b: ldarg.0
            IL_001c: ldfld class [DevExpress.Data.v11.1]DevExpress.Xpo.Helpers.ICommandChannel DevExpress.Xpo.DB.DataStoreService::commandChannel
            IL_0021: brtrue.s IL_0069
     
            IL_0023: ldarg.0
            IL_0024: ldfld class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.IDataStore DevExpress.Xpo.DB.DataStoreService::provider
            IL_0029: brtrue.s IL_0042
     
            IL_002b: ldc.i4.3
            IL_002c: ldstr "Command '{0}' is not supported."
            IL_0031: ldloc.0
            IL_0032: ldfld string DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClasse'::command
            IL_0037: call string [mscorlib]System.String::Format(stringobject)
            IL_003c: newobj instance void class DevExpress.Xpo.DB.OperationResult`1<object>::.ctor(valuetype DevExpress.Xpo.DB.ServiceException,  string)
            IL_0041: ret
     
            IL_0042: ldc.i4.3
            IL_0043: ldstr "Command '{0}' is not supported by {1}."
            IL_0048: ldloc.0
            IL_0049: ldfld string DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClasse'::command
            IL_004e: ldarg.0
            IL_004f: ldfld class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.IDataStore DevExpress.Xpo.DB.DataStoreService::provider
            IL_0054: callvirt instance class [mscorlib]System.Type [mscorlib]System.Object::GetType()
            IL_0059: callvirt instance string [mscorlib]System.Type::get_FullName()
            IL_005e: call string [mscorlib]System.String::Format(stringobjectobject)
            IL_0063: newobj instance void class DevExpress.Xpo.DB.OperationResult`1<object>::.ctor(valuetype DevExpress.Xpo.DB.ServiceException,  string)
            IL_0068: ret
     
            IL_0069: ldarg.0
            IL_006a: ldloc.0
            IL_006b: ldftn instance object DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClasse'::'<Do>b__d'()
            IL_0071: newobj instance void class DevExpress.Xpo.DB.OperationResultPredicate`1<object>::.ctor(object,  native int)
            IL_0076: call instance class DevExpress.Xpo.DB.OperationResult`1<!!0> DevExpress.Xpo.DB.DataStoreService::Execute<object>(class DevExpress.Xpo.DB.OperationResultPredicate`1<!!0>)
            IL_007b: ret
        }
     
        .method family hidebysig
            instance class DevExpress.Xpo.DB.OperationResult`1<!!T> Execute<T> (
                class DevExpress.Xpo.DB.OperationResultPredicate`1<!!T> predicate
            ) cil managed
        {
            .locals init (
                [0] class [mscorlib]System.NotSupportedException notSupportedException,
                [1] class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.Exceptions.SchemaCorrectionNeededException schemaCorrectionNeededException,
                [2] class [mscorlib]System.Exception exception,
                [3] class DevExpress.Xpo.DB.OperationResult`1<!!T> V_3
            )
     
            .try
            {
                IL_0000: ldarg.1
                IL_0001: callvirt instance !0 class DevExpress.Xpo.DB.OperationResultPredicate`1<!!T>::Invoke()
                IL_0006: newobj instance void class DevExpress.Xpo.DB.OperationResult`1<!!T>::.ctor(!0)
                IL_000b: stloc.3
                IL_000c: leave.s IL_0053
            }
            catch [mscorlib]System.NotSupportedException
            {
                IL_000e: stloc.0
                IL_000f: ldarg.0
                IL_0010: ldloc.0
                IL_0011: callvirt instance void DevExpress.Xpo.DB.ServiceBase::OnServiceExceptionThrown(class [mscorlib]System.Exception)
                IL_0016: ldc.i4.3
                IL_0017: ldloc.0
                IL_0018: callvirt instance string [mscorlib]System.Exception::get_Message()
                IL_001d: newobj instance void class DevExpress.Xpo.DB.OperationResult`1<!!T>::.ctor(valuetype DevExpress.Xpo.DB.ServiceException,  string)
                IL_0022: stloc.3
                IL_0023: leave.s IL_0053
            }
            catch [DevExpress.Data.v11.1]DevExpress.Xpo.DB.Exceptions.SchemaCorrectionNeededException
            {
                IL_0025: stloc.1
                IL_0026: ldarg.0
                IL_0027: ldloc.1
                IL_0028: callvirt instance void DevExpress.Xpo.DB.ServiceBase::OnServiceExceptionThrown(class [mscorlib]System.Exception)
                IL_002d: ldc.i4.2
                IL_002e: ldloc.1
                IL_002f: callvirt instance string [mscorlib]System.Exception::get_Message()
                IL_0034: newobj instance void class DevExpress.Xpo.DB.OperationResult`1<!!T>::.ctor(valuetype DevExpress.Xpo.DB.ServiceException,  string)
                IL_0039: stloc.3
                IL_003a: leave.s IL_0053
            }
            catch [mscorlib]System.Exception
            {
                IL_003c: stloc.2
                IL_003d: ldarg.0
                IL_003e: ldloc.2
                IL_003f: callvirt instance void DevExpress.Xpo.DB.ServiceBase::OnServiceExceptionThrown(class [mscorlib]System.Exception)
                IL_0044: ldc.i4.1
                IL_0045: ldloc.2
                IL_0046: callvirt instance string [mscorlib]System.Exception::get_Message()
                IL_004b: newobj instance void class DevExpress.Xpo.DB.OperationResult`1<!!T>::.ctor(valuetype DevExpress.Xpo.DB.ServiceException,  string)
                IL_0050: stloc.3
                IL_0051: leave.s IL_0053
            }
     
            IL_0053: ldloc.3
            IL_0054: ret
        }
     
        .method public hidebysig newslot virtual
            instance class DevExpress.Xpo.DB.OperationResult`1<valuetype [DevExpress.Data.v11.1]DevExpress.Xpo.DB.AutoCreateOption> GetAutoCreateOption () cil managed
        {
            IL_0000: ldarg.0
            IL_0001: ldarg.0
            IL_0002: ldftn instance valuetype [DevExpress.Data.v11.1]DevExpress.Xpo.DB.AutoCreateOption DevExpress.Xpo.DB.DataStoreService::'<GetAutoCreateOption>b__c'()
            IL_0008: newobj instance void class DevExpress.Xpo.DB.OperationResultPredicate`1<valuetype [DevExpress.Data.v11.1]DevExpress.Xpo.DB.AutoCreateOption>::.ctor(object,  native int)
            IL_000d: call instance class DevExpress.Xpo.DB.OperationResult`1<!!0> DevExpress.Xpo.DB.DataStoreService::Execute<valuetype [DevExpress.Data.v11.1]DevExpress.Xpo.DB.AutoCreateOption>(class DevExpress.Xpo.DB.OperationResultPredicate`1<!!0>)
            IL_0012: ret
        }
     
        .method public hidebysig newslot virtual
            instance class DevExpress.Xpo.DB.OperationResult`1<class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.ModificationResult> ModifyData (
                class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.ModificationStatement[] dmlStatements
            ) cil managed
        {
            .locals init (
                [0] class DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClass1' V_0
            )
     
            IL_0000: newobj instance void DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClass1'::.ctor()
            IL_0005: stloc.0
            IL_0006: ldloc.0
            IL_0007: ldarg.1
            IL_0008: stfld class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.ModificationStatement[] DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClass1'::dmlStatements
            IL_000d: ldloc.0
            IL_000e: ldarg.0
            IL_000f: stfld class DevExpress.Xpo.DB.DataStoreService DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClass1'::'<>4__this'
            IL_0014: ldarg.0
            IL_0015: ldloc.0
            IL_0016: ldftn instance class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.ModificationResult DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClass1'::'<ModifyData>b__0'()
            IL_001c: newobj instance void class DevExpress.Xpo.DB.OperationResultPredicate`1<class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.ModificationResult>::.ctor(object,  native int)
            IL_0021: call instance class DevExpress.Xpo.DB.OperationResult`1<!!0> DevExpress.Xpo.DB.DataStoreService::Execute<class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.ModificationResult>(class DevExpress.Xpo.DB.OperationResultPredicate`1<!!0>)
            IL_0026: ret
        }
     
        .method public hidebysig newslot virtual
            instance class DevExpress.Xpo.DB.OperationResult`1<class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.SelectedData> SelectData (
                class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.SelectStatement[] selects
            ) cil managed
        {
            .locals init (
                [0] class DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClass4' V_0
            )
     
            IL_0000: newobj instance void DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClass4'::.ctor()
            IL_0005: stloc.0
            IL_0006: ldloc.0
            IL_0007: ldarg.1
            IL_0008: stfld class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.SelectStatement[] DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClass4'::selects
            IL_000d: ldloc.0
            IL_000e: ldarg.0
            IL_000f: stfld class DevExpress.Xpo.DB.DataStoreService DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClass4'::'<>4__this'
            IL_0014: ldarg.0
            IL_0015: ldloc.0
            IL_0016: ldftn instance class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.SelectedData DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClass4'::'<SelectData>b__3'()
            IL_001c: newobj instance void class DevExpress.Xpo.DB.OperationResultPredicate`1<class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.SelectedData>::.ctor(object,  native int)
            IL_0021: call instance class DevExpress.Xpo.DB.OperationResult`1<!!0> DevExpress.Xpo.DB.DataStoreService::Execute<class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.SelectedData>(class DevExpress.Xpo.DB.OperationResultPredicate`1<!!0>)
            IL_0026: ret
        }
     
        .method public hidebysig newslot virtual
            instance class DevExpress.Xpo.DB.OperationResult`1<uint8[]> SelectDataRaw (
                class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.SelectStatement[] selects
            ) cil managed
        {
            .locals init (
                [0] class DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClass7' V_0
            )
     
            IL_0000: newobj instance void DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClass7'::.ctor()
            IL_0005: stloc.0
            IL_0006: ldloc.0
            IL_0007: ldarg.1
            IL_0008: stfld class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.SelectStatement[] DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClass7'::selects
            IL_000d: ldloc.0
            IL_000e: ldarg.0
            IL_000f: stfld class DevExpress.Xpo.DB.DataStoreService DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClass7'::'<>4__this'
            IL_0014: ldarg.0
            IL_0015: ldloc.0
            IL_0016: ldftn instance uint8[] DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClass7'::'<SelectDataRaw>b__6'()
            IL_001c: newobj instance void class DevExpress.Xpo.DB.OperationResultPredicate`1<uint8[]>::.ctor(object,  native int)
            IL_0021: call instance class DevExpress.Xpo.DB.OperationResult`1<!!0> DevExpress.Xpo.DB.DataStoreService::Execute<uint8[]>(class DevExpress.Xpo.DB.OperationResultPredicate`1<!!0>)
            IL_0026: ret
        }
     
        .method public hidebysig newslot virtual
            instance class DevExpress.Xpo.DB.OperationResult`1<valuetype [DevExpress.Data.v11.1]DevExpress.Xpo.DB.UpdateSchemaResult> UpdateSchema (
                bool dontCreateIfFirstTableNotExist,
                class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.DBTable[] tables
            ) cil managed
        {
            .locals init (
                [0] class DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClassa' V_0
            )
     
            IL_0000: newobj instance void DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClassa'::.ctor()
            IL_0005: stloc.0
            IL_0006: ldloc.0
            IL_0007: ldarg.1
            IL_0008: stfld bool DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClassa'::dontCreateIfFirstTableNotExist
            IL_000d: ldloc.0
            IL_000e: ldarg.2
            IL_000f: stfld class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.DBTable[] DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClassa'::tables
            IL_0014: ldloc.0
            IL_0015: ldarg.0
            IL_0016: stfld class DevExpress.Xpo.DB.DataStoreService DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClassa'::'<>4__this'
            IL_001b: ldarg.0
            IL_001c: ldloc.0
            IL_001d: ldftn instance valuetype [DevExpress.Data.v11.1]DevExpress.Xpo.DB.UpdateSchemaResult DevExpress.Xpo.DB.DataStoreService/'<>c__DisplayClassa'::'<UpdateSchema>b__9'()
            IL_0023: newobj instance void class DevExpress.Xpo.DB.OperationResultPredicate`1<valuetype [DevExpress.Data.v11.1]DevExpress.Xpo.DB.UpdateSchemaResult>::.ctor(object,  native int)
            IL_0028: call instance class DevExpress.Xpo.DB.OperationResult`1<!!0> DevExpress.Xpo.DB.DataStoreService::Execute<valuetype [DevExpress.Data.v11.1]DevExpress.Xpo.DB.UpdateSchemaResult>(class DevExpress.Xpo.DB.OperationResultPredicate`1<!!0>)
            IL_002d: ret
        }
     
        .class nested private auto ansi sealed beforefieldinit '<>c__DisplayClass1'
            extends [mscorlib]System.Object
        {
            .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = (
                01 00 00 00
            )
            .field public class DevExpress.Xpo.DB.DataStoreService '<>4__this'
     
            .field public class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.ModificationStatement[] dmlStatements
     
            .method public hidebysig specialname rtspecialname
                instance void .ctor () cil managed
     
            .method public hidebysig
                instance class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.ModificationResult '<ModifyData>b__0' () cil managed
        }
     
        .class nested private auto ansi sealed beforefieldinit '<>c__DisplayClass4'
            extends [mscorlib]System.Object
        {
            .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = (
                01 00 00 00
            )
            .field public class DevExpress.Xpo.DB.DataStoreService '<>4__this'
     
            .field public class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.SelectStatement[] selects
     
            .method public hidebysig specialname rtspecialname
                instance void .ctor () cil managed
     
            .method public hidebysig
                instance class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.SelectedData '<SelectData>b__3' () cil managed
        }
     
        .class nested private auto ansi sealed beforefieldinit '<>c__DisplayClass7'
            extends [mscorlib]System.Object
        {
            .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = (
                01 00 00 00
            )
            .field public class DevExpress.Xpo.DB.DataStoreService '<>4__this'
     
            .field public class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.SelectStatement[] selects
     
            .method public hidebysig specialname rtspecialname
                instance void .ctor () cil managed
     
            .method public hidebysig
                instance uint8[] '<SelectDataRaw>b__6' () cil managed
        }
     
        .class nested private auto ansi sealed beforefieldinit '<>c__DisplayClassa'
            extends [mscorlib]System.Object
        {
            .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = (
                01 00 00 00
            )
            .field public class DevExpress.Xpo.DB.DataStoreService '<>4__this'
     
            .field public bool dontCreateIfFirstTableNotExist
     
            .field public class [DevExpress.Data.v11.1]DevExpress.Xpo.DB.DBTable[] tables
     
            .method public hidebysig specialname rtspecialname
                instance void .ctor () cil managed
     
            .method public hidebysig
                instance valuetype [DevExpress.Data.v11.1]DevExpress.Xpo.DB.UpdateSchemaResult '<UpdateSchema>b__9' () cil managed
        }
     
        .class nested private auto ansi sealed beforefieldinit '<>c__DisplayClasse'
            extends [mscorlib]System.Object
        {
            .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = (
                01 00 00 00
            )
            .field public class DevExpress.Xpo.DB.DataStoreService '<>4__this'
     
            .field public object args
     
            .field public string command
     
            .method public hidebysig specialname rtspecialname
                instance void .ctor () cil managed
     
            .method public hidebysig
                instance object '<Do>b__d' () cil managed
        }
    }

    Gives that C#
    [AspNetCompatibilityRequirements(RequirementsMode=AspNetCompatibilityRequirementsMode.Allowed)]
    public class DataStoreService : ServiceBase, IDataStoreServiceEx, IDataStoreService
    {
        protected readonly ICommandChannel commandChannel;
     
        protected IDataStore provider;
     
        public DataStoreService(IDataStore provider)
        {
            this.provider = provider;
            this.commandChannel = provider as ICommandChannel;
        }
     
        [CompilerGenerated]
        private AutoCreateOption <GetAutoCreateOption>b__c()
        {
            return this.provider.AutoCreateOption;
        }
     
        public virtual OperationResult<object> Do(string command, object args)
        {
            if (commandChannel != null || dataStore == null)
            {
                return new OperationResult<object>(ServiceException.NotSupported, string.Format("Command '{0}' is not supported.", command));
            }
            return new OperationResult<object>(ServiceException.NotSupported, string.Format("Command '{0}' is not supported by {1}.", dataStoreService.command, this.provider.GetType().FullName));
            return this.Execute<object>(new OperationResultPredicate<object>(dataStoreService.<Do>b__d));
        }
     
        protected OperationResult<T> Execute<T>(OperationResultPredicate<T> predicate)
        {
            try
            {
                return new OperationResult<T>(predicate());
            }
            catch (NotSupportedException notSupportedException)
            {
                base.OnServiceExceptionThrown(notSupportedException);
                return new OperationResult<T>(ServiceException.NotSupported, notSupportedException.Message);
            }
            catch (SchemaCorrectionNeededException schemaCorrectionNeededException)
            {
                base.OnServiceExceptionThrown(schemaCorrectionNeededException);
                return new OperationResult<T>(ServiceException.Schema, schemaCorrectionNeededException.Message);
            }
            catch (Exception exception)
            {
                base.OnServiceExceptionThrown(exception);
                return new OperationResult<T>(ServiceException.Unknown, exception.Message);
            }
        }
     
        public virtual OperationResult<AutoCreateOption> GetAutoCreateOption()
        {
            return this.Execute<AutoCreateOption>(new OperationResultPredicate<AutoCreateOption>(() => this.provider.AutoCreateOption));
        }
     
        public virtual OperationResult<ModificationResult> ModifyData(ModificationStatement[] dmlStatements)
        {
            return this.Execute<ModificationResult>(delegate {
                return dataStore.ModifyData(dmlStatements);
            });
        }
     
        public virtual OperationResult<SelectedData> SelectData(SelectStatement[] selects)
        {
            return this.Execute<SelectedData>(delegate {
                return dataStore.SelectData(selects);
            });
        }
     
        public virtual OperationResult<byte[]> SelectDataRaw(SelectStatement[] selects)
        {
            return this.Execute<byte[]>(delegate {
                SelectedData selectedDatum = dataStore.SelectData(selects);
                return WcfIsGreatWhenUsedAsADumbPipeHelper.Wrap((selectedDatum == null ? null : selectStatementResultArray));
            });
        }
     
        public virtual OperationResult<UpdateSchemaResult> UpdateSchema(bool dontCreateIfFirstTableNotExist, DBTable[] tables)
        {
            return this.Execute<UpdateSchemaResult>(delegate {
                return dataStore.UpdateSchema(dontCreateIfFirstTableNotExist, tables);
            });
        }
     
        [CompilerGenerated]
        private sealed class <>c__DisplayClass1
        {
            public DataStoreService <>4__this;
     
            public ModificationStatement[] dmlStatements;
     
            public DataStoreService();
     
            public ModificationResult <ModifyData>b__0();
        }
     
        [CompilerGenerated]
        private sealed class <>c__DisplayClass4
        {
            public DataStoreService <>4__this;
     
            public SelectStatement[] selects;
     
            public DataStoreService();
     
            public SelectedData <SelectData>b__3();
        }
     
        [CompilerGenerated]
        private sealed class <>c__DisplayClass7
        {
            public DataStoreService <>4__this;
     
            public SelectStatement[] selects;
     
            public DataStoreService();
     
            public byte[] <SelectDataRaw>b__6();
        }
     
        [CompilerGenerated]
        private sealed class <>c__DisplayClassa
        {
            public DataStoreService <>4__this;
     
            public bool dontCreateIfFirstTableNotExist;
     
            public DBTable[] tables;
     
            public DataStoreService();
     
            public UpdateSchemaResult <UpdateSchema>b__9();
        }
     
        [CompilerGenerated]
        private sealed class <>c__DisplayClasse
        {
            public DataStoreService <>4__this;
     
            public object args;
     
            public string command;
     
            public DataStoreService();
     
            public object <Do>b__d();
        }
    }

    Where reflector gives:
    [AspNetCompatibilityRequirements(RequirementsMode=AspNetCompatibilityRequirementsMode.Allowed)]
    public class DataStoreService : ServiceBase, IDataStoreServiceEx, IDataStoreService
    {
        // Fields
        protected readonly ICommandChannel commandChannel;
        protected IDataStore provider;
     
        // Methods
        public DataStoreService(IDataStore provider)
        {
            this.provider = provider;
            this.commandChannel = provider as ICommandChannel;
        }
     
        public virtual OperationResult<object> Do(string command, object args)
        {
            if (this.commandChannel != null)
            {
                return this.Execute<object>(delegate {
                    return this.commandChannel.Do(command, args);
                });
            }
            if (this.provider == null)
            {
                return new OperationResult<object>(ServiceException.NotSupported, string.Format("Command '{0}' is not supported.", command));
            }
            return new OperationResult<object>(ServiceException.NotSupported, string.Format("Command '{0}' is not supported by {1}.", command, this.provider.GetType().FullName));
        }
     
        protected OperationResult<T> Execute<T>(OperationResultPredicate<T> predicate)
        {
            try
            {
                return new OperationResult<T>(predicate());
            }
            catch (NotSupportedException exception)
            {
                this.OnServiceExceptionThrown(exception);
                return new OperationResult<T>(ServiceException.NotSupported, exception.Message);
            }
            catch (SchemaCorrectionNeededException exception2)
            {
                this.OnServiceExceptionThrown(exception2);
                return new OperationResult<T>(ServiceException.Schema, exception2.Message);
            }
            catch (Exception exception3)
            {
                this.OnServiceExceptionThrown(exception3);
                return new OperationResult<T>(ServiceException.Unknown, exception3.Message);
            }
        }
     
        public virtual OperationResult<AutoCreateOption> GetAutoCreateOption()
        {
            return this.Execute<AutoCreateOption>(delegate {
                return this.provider.AutoCreateOption;
            });
        }
     
        public virtual OperationResult<ModificationResult> ModifyData(ModificationStatement[] dmlStatements)
        {
            return this.Execute<ModificationResult>(delegate {
                return this.provider.ModifyData(dmlStatements);
            });
        }
     
        public virtual OperationResult<SelectedData> SelectData(SelectStatement[] selects)
        {
            return this.Execute<SelectedData>(delegate {
                return this.provider.SelectData(selects);
            });
        }
     
        public virtual OperationResult<byte[]> SelectDataRaw(SelectStatement[] selects)
        {
            return this.Execute<byte[]>(delegate {
                SelectedData data = this.provider.SelectData(selects);
                return WcfIsGreatWhenUsedAsADumbPipeHelper.Wrap((data == null) ? null : data.ResultSet);
            });
        }
     
        public virtual OperationResult<UpdateSchemaResult> UpdateSchema(bool dontCreateIfFirstTableNotExist, DBTable[] tables)
        {
            return this.Execute<UpdateSchemaResult>(delegate {
                return this.provider.UpdateSchema(dontCreateIfFirstTableNotExist, tables);
            });
        }
    }

  2. Yordan Dikov
    Admin
    Yordan Dikov avatar
    69 posts

    Posted 28 Jul 2011 Link to this post

    Hi John,

     I cannot reproduce your problem due to unavailable referenced assemblies. It would be really helpful if you could send us the dll you try to decompile and all dlls it references. Rather unfortunately that's teh only way we could tackle this problem.

    All the best,
    Yordan Dikov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  3. DevCraft banner
  4. Jonx
    Jonx avatar
    258 posts
    Member since:
    Jul 2012

    Posted 28 Jul 2011 Link to this post

    Hello Yordan,
    I understand but is it enought to get the exact reference of the DDL so that you can get it by yourself?
    See the attached screenshot. I guess I cannot attach dll from a commercial product here...
    Maybe in a private issue?
    Let me know what you prefer.
    All the best,
    John.

  5. Yordan Dikov
    Admin
    Yordan Dikov avatar
    69 posts

    Posted 01 Aug 2011 Link to this post

    Hello John,

    I don't have any of those dll's available here. It will be great if you can send me the dll you try to decompile to yordan dot dikov at telerik dot com. As much as I googled, this assembly seems to be redistributable, so I hope it doesn't cause you any problems to send it. (http://devexpress.com/Support/EULAs/NetComponents.xml). I hope it will be enough and we won't need the referenced assemblies to pinpoint the issue. Thanks again for the help.


    Greetings,
    Yordan Dikov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Back to Top