SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Identifier expected

Last post 04-09-2015 10:56 AM by stadelma. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 04-09-2015 10:56 AM

    • stadelma
    • Not Ranked
    • Joined on 04-09-2015
    • Zug / Switzerland
    • Posts 1

    Identifier expected

    HI,

    I am absolute new to ILSpy, and not so new but still laking on C#, but used ILSpy to decompile into CS from my Toolbox.DLL made by RemObject's Oxygene Pascal Compiler from Toolbx.pas. This decompilation brougth me nice insight into what code is generated.
    I do so because when I call a function in Toolbox.dll (only) from a remote hosts WIndows 2008 R2 IIS 7.5 WCF Web Site Service, I get a TypeInitializationException for my Toolbox.__Global class, whereas the __Global class is said to be public static.

    This __Global class is compiler generated. Hence I have no direct influence on what is generated, hence I use ILSPy to look at it.As ILSpy generates nice C# code, So I am about to port this code to a ToolboxCS project to find out by a debugger what goes wrong.
    The thing why I am writing here is, because I found the following syntax generated by the CS decompiler used by ILSpy.
    And when I move this code to my ToolboxCS project it flags me  <PublicImplementationDetails> and <T> and similar syntaxes with <...> bad.

    The error I receive is:
    The Type or Namespacename <PublicImplementationDetails> could not be found.
    (are you missing a using directive or an assembly reference?)

    a) is this syntax correct for a CS compiler like used with Visual Studio 2012
    b) if not why is it decompiled that way by ILSpy é all?
    c) any thoughts what I can do to make this an correct syntax?

    code in question is:

    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Runtime.CompilerServices;
    using System.Runtime.InteropServices;

    [CompilerGenerated]
    [StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)]
    public static class <PublicImplementationDetails>
    {
        [Serializable]
        [StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)]
        public sealed class Set<T> : IEnumerable, IEnumerable<T> where T : struct
        {
            [StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)]
            private sealed class SetIterator : IEnumerator, IEnumerator<T>
            {
                private int fIndex;
                private <PublicImplementationDetails>.Set<T> fOwner;
                public object NGCurrent
                {
                    get
                    {
                        return this.Current;
                    }
                }
                public T Current
                {
                    get
                    {
                        return <PublicImplementationDetails>.Set<T>.fConvertTo(this.fIndex);
                    }
                }

    . . . .

    . . . .

    What do I miss in my code to add?

    Thanks for any insight

    Josef

Page 1 of 1 (1 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.