File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919// COM, set the ComVisible attribute to true on that type.
2020[ assembly: ComVisible ( false ) ]
2121
22- [ assembly: AssemblyVersion ( "0.11.3.2 " ) ]
23- [ assembly: AssemblyFileVersion ( "0.11.3.2 " ) ]
22+ [ assembly: AssemblyVersion ( "0.11.4.1 " ) ]
23+ [ assembly: AssemblyFileVersion ( "0.11.4.1 " ) ]
2424
Original file line number Diff line number Diff line change @@ -11,11 +11,13 @@ internal static class DbTypeLookup
1111 { "uniqueidentifier" , SqlDbType . UniqueIdentifier } ,
1212 { "date" , SqlDbType . Date } ,
1313 { "time" , SqlDbType . Time } ,
14- // {"datetime2", SqlDbType.DateTime2},
15- // {
16- // "datetimeoffset",
17- // SqlDbType.DateTimeOffset
18- // },
14+ #if( ! MONO )
15+ { "datetime2" , SqlDbType . DateTime2 } ,
16+ {
17+ "datetimeoffset" ,
18+ SqlDbType . DateTimeOffset
19+ } ,
20+ #endif
1921 { "tinyint" , SqlDbType . TinyInt } ,
2022 { "smallint" , SqlDbType . SmallInt } ,
2123 { "int" , SqlDbType . Int } ,
Original file line number Diff line number Diff line change @@ -10,8 +10,12 @@ namespace Simple.Data.SqlTest
1010{
1111 internal static class DatabaseHelper
1212 {
13- public static readonly string ConnectionString =
13+ public static readonly string ConnectionString =
14+ #if( MONO )
1415 "Data Source=10.37.129.4;Initial Catalog=SimpleTest;User ID=SimpleUser;Password=SimplePassword" ;
16+ #else
17+ Properties . Settings . Default . ConnectionString ;
18+ #endif
1519
1620 public static dynamic Open ( )
1721 {
Original file line number Diff line number Diff line change @@ -53,15 +53,25 @@ public static T GetAdjacentComponent<T>(Type knownSiblingType)
5353 }
5454 }
5555
56- private static CompositionContainer CreateContainer ( )
56+ static string GetThisAssemblyPath ( )
5757 {
58- var path = Assembly . GetExecutingAssembly ( ) . CodeBase . Replace ( "file:///" , "" ) . Replace ( "file://" , "//" ) ;
58+ var path = Assembly . GetExecutingAssembly ( ) . CodeBase . Replace ( "file:///" , "" ) . Replace ( "file://" , "//" ) ;
5959 path = Path . GetDirectoryName ( path ) ;
6060 if ( path == null ) throw new ArgumentException ( "Unrecognised file." ) ;
61+ if ( ! Path . IsPathRooted ( path ) )
62+ {
63+ path = Path . DirectorySeparatorChar + path ;
64+ }
65+ return path ;
66+ }
67+
68+ private static CompositionContainer CreateContainer ( )
69+ {
70+ var path = GetThisAssemblyPath ( ) ;
6171
6272 var assemblyCatalog = new AssemblyCatalog ( Assembly . GetExecutingAssembly ( ) ) ;
6373 var aggregateCatalog = new AggregateCatalog ( assemblyCatalog ) ;
64- foreach ( string file in System . IO . Directory . GetFiles ( "/" + path , "Simple.Data.*.dll" ) )
74+ foreach ( string file in System . IO . Directory . GetFiles ( path , "Simple.Data.*.dll" ) )
6575 {
6676 var catalog = new AssemblyCatalog ( file ) ;
6777 aggregateCatalog . Catalogs . Add ( catalog ) ;
You can’t perform that action at this time.
0 commit comments