dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Reflection/Emit Assemb


From: Richard Baumann <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/runtime/System/Reflection/Emit AssemblyBuilder.cs, 1.8, 1.9
Date: Sun, 20 Jul 2003 01:00:04 -0400

Update of /cvsroot/dotgnu-pnet/pnetlib/runtime/System/Reflection/Emit
In directory subversions:/tmp/cvs-serv16526/runtime/System/Reflection/Emit

Modified Files:
        AssemblyBuilder.cs 
Log Message:
Updates to AssemblyBuilder for handling Save and SetEntryPoint.


Index: AssemblyBuilder.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/runtime/System/Reflection/Emit/AssemblyBuilder.cs,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** AssemblyBuilder.cs  26 May 2003 05:03:41 -0000      1.8
--- AssemblyBuilder.cs  20 Jul 2003 05:00:02 -0000      1.9
***************
*** 47,50 ****
--- 47,51 ----
        private ModuleBuilder module;
        private ArrayList detachList;
+       private PEFileKinds fileKind;
  
        // Constructor.  Called from AppDomain.DefineDynamicAssembly.
***************
*** 58,61 ****
--- 59,63 ----
                                this.entryPoint = null;
                                this.detachList = new ArrayList();
+                               fileKind = PEFileKinds.Dll;
                                Version version = name.Version;
                                lock(typeof(AssemblyBuilder))
***************
*** 321,324 ****
--- 323,339 ----
        public void Save(String assemblyFileName)
                        {
+                               if (assemblyFileName == null)
+                               {
+                                       throw new ArgumentNullException(/* TODO 
*/);
+                               }
+                               if (assemblyFileName.Length == 0)
+                               {
+                                       throw new ArgumentException(/* TODO */);
+                               }
+                               if (saved || (access & 
AssemblyBuilderAccess.Save) == 0)
+                               {
+                                       throw new InvalidOperationException(/* 
TODO */);
+                               }
+                               /* TODO: the rest of the exception throwing 
checks */
                                throw new NotImplementedException("Save");
                        }
***************
*** 376,387 ****
                                                
(_("Invalid_EntryNotInAssembly"));
                                }
-                               lock(typeof(AssemblyBuilder))
-                               {
-                               /*      TODO
-                                       
ClrSetEntryPoint(((MethodBuilder)entryMethod).ClrHandle,
-                                                                fileKind);
-                               */
-                               }
                                entryPoint = entryMethod;
                        }
  
--- 391,396 ----
                                                
(_("Invalid_EntryNotInAssembly"));
                                }
                                entryPoint = entryMethod;
+                               this.fileKind = fileKind;
                        }
  
***************
*** 439,446 ****
                         AssemblyBuilderAccess access, out IntPtr writer);
  
!       // Internal version of "SetEntryPoint".
        [MethodImpl(MethodImplOptions.InternalCall)]
!       extern private void ClrSetEntryPoint(IntPtr clrMethod,
!                                                                               
 PEFileKinds fileKind);
  
        // Get the token associated with a particular program item.
--- 448,456 ----
                         AssemblyBuilderAccess access, out IntPtr writer);
  
!       // Save the assembly to a file.
        [MethodImpl(MethodImplOptions.InternalCall)]
!       extern private static bool ClrSave(IntPtr assembly, IntPtr writer,
!                                          String path, IntPtr entryMethod,
!                                          PEFileKinds fileKind /*, TODO */);
  
        // Get the token associated with a particular program item.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]