Example #1
0
 public static void Dispose(IO::FileStream aThis, bool disposing,
                            [FieldAccess(Name = "$$InnerStream$$")] ref IO::Stream innerStream)
 {
     if (disposing)
     {
         innerStream.Dispose();
     }
 }
Example #2
0
 public static void Dispose(IO::FileStream aThis, bool disposing)
 {
     throw new NotImplementedException();
 }
Example #3
0
 public static void SetLength(IO::FileStream aThis, long aLength,
                              [FieldAccess(Name = "$$InnerStream$$")] ref IO::Stream innerStream)
 {
     innerStream.SetLength(aLength);
 }
Example #4
0
 public static long get_Length(IO::FileStream aThis,
                               [FieldAccess(Name = "$$InnerStream$$")] ref IO::Stream innerStream)
 {
     return(innerStream.Length);
 }
Example #5
0
 public static void Write(IO::FileStream aThis, byte[] aBuffer, int aOffset, int aCount,
                          [FieldAccess(Name = "$$InnerStream$$")] ref IO::Stream innerStream)
 {
     innerStream.Write(aBuffer, aOffset, aCount);
 }
Example #6
0
 public static int Read(IO::FileStream aThis, byte[] aBuffer, int aOffset, int aCount,
                        [FieldAccess(Name = "$$InnerStream$$")] ref IO::Stream innerStream)
 {
     return(innerStream.Read(aBuffer, aOffset, aCount));
 }
Example #7
0
        // This plug basically forwards all calls to the $$InnerStream$$ stream, which is supplied by the file system.

        //  public static unsafe void Ctor(String aThis, [FieldAccess(Name = "$$Storage$$")]ref Char[] aStorage, Char[] aChars, int aStartIndex, int aLength,

        public static void Ctor(IO::FileStream aThis, string aPathname, IO::FileMode aMode,
                                [FieldAccess(Name = "$$InnerStream$$")] ref IO::Stream innerStream)
        {
            innerStream = VFSManager.GetFileStream(aPathname);
        }
Example #8
0
 public static void set_Position(IO::FileStream aThis,
                                 [FieldAccess(Name = "$$InnerStream$$")] ref IO::Stream innerStream, long value)
 {
     innerStream.Position = value;
 }
Example #9
0
 public static long get_Position(IO::FileStream aThis,
                                 [FieldAccess(Name = "$$InnerStream$$")] ref IO::Stream innerStream)
 {
     return(innerStream.Position);
 }
Example #10
0
 public static void Flush(IO::FileStream aThis,
                          [FieldAccess(Name = "$$InnerStream$$")] ref IO::Stream innerStream)
 {
     innerStream.Flush();
 }
Example #11
0
 public static long Seek(IO::FileStream aThis,
                         [FieldAccess(Name = "$$InnerStream$$")] ref IO::Stream innerStream, long offset, SeekOrigin origin)
 {
     return(innerStream.Seek(offset, origin));
 }
Example #12
0
        // This plug basically forwards all calls to the $$InnerStream$$ stream, which is supplied by the file system.

        //  public static unsafe void Ctor(String aThis, [FieldAccess(Name = "$$Storage$$")]ref Char[] aStorage, Char[] aChars, int aStartIndex, int aLength,

        public static void Ctor(IO::FileStream aThis, string aPathname, IO::FileMode aMode,
                                [FieldAccess(Name = "$$InnerStream$$")] ref IO::Stream innerStream)
        {
            FatHelpers.Debug("In FileStream.Ctor");
            innerStream = InitializeStream(aPathname, aMode);
        }
Example #13
0
 public static void SetLength(IO::FileStream aThis, long value)
 {
     throw new NotImplementedException();
 }
Example #14
0
 static public int Read(IO::FileStream aThis, byte[] aBuffer, int aOffset, int aCount)
 {
     return(0);
 }
Example #15
0
        //[PlugField(FieldId = "$$Storage$$", FieldType = typeof(char[]))]
        //[PlugField(FieldId = "System.Char System.String.m_firstChar", IsExternalValue = true)]
        //public static class StringImpl {
        //  //[PlugMethod(Signature = "System_Void__System_String__ctor_System_Char____System_Int32__System_Int32_")]
        //  public static unsafe void Ctor(String aThis, [FieldAccess(Name = "$$Storage$$")]ref Char[] aStorage, Char[] aChars, int aStartIndex, int aLength,
        //    [FieldAccess(Name = "System.Int32 System.String.m_stringLength")] ref int aStringLength,
        //    [FieldAccess(Name = "System.Char System.String.m_firstChar")] ref char* aFirstChar) {
        //    Char[] newChars = new Char[aLength];
        //    Array.Copy(aChars, aStartIndex, newChars, 0, aLength);
        //    aStorage = newChars;
        //    aStringLength = newChars.Length;
        //    fixed (char* xFirstChar = &aStorage[0]) {
        //      aFirstChar = xFirstChar;
        //    }
        //  }

        static public void Ctor(IO::FileStream aThis, string aPathname, IO::FileMode aMode)
        {
        }