Changeset 9363 for branches/OaaS/HeuristicLab.Services.Hive.DataAccess
- Timestamp:
- 04/16/13 13:13:41 (11 years ago)
- Location:
- branches/OaaS
- Files:
-
- 13 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/OaaS
- Property svn:ignore
-
old new 21 21 protoc.exe 22 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll 23 24 packages
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/OaaS/HeuristicLab.Services.Hive.DataAccess
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/trunk/sources/HeuristicLab.Services.Hive.DataAccess merged eligible /branches/Algorithms.GradientDescent/HeuristicLab.Services.Hive.DataAccess 5516-5520 /branches/Benchmarking/sources/HeuristicLab.Services.Hive.DataAccess 6917-7005 /branches/CloningRefactoring/HeuristicLab.Services.Hive.DataAccess 4656-4721 /branches/DataAnalysis Refactoring/HeuristicLab.Services.Hive.DataAccess 5471-5808 /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Services.Hive.DataAccess 5815-6180 /branches/DataAnalysis/HeuristicLab.Services.Hive.DataAccess 4458-4459,4462,4464 /branches/GP.Grammar.Editor/HeuristicLab.Services.Hive.DataAccess 6284-6795 /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Services.Hive.DataAccess 5060 /branches/HiveTaskScheduler/HeuristicLab.Services.Hive.DataAccess 8687-9106 /branches/NET40/sources/HeuristicLab.Services.Hive.DataAccess 5138-5162 /branches/ParallelEngine/HeuristicLab.Services.Hive.DataAccess 5175-5192 /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Services.Hive.DataAccess 7568-7810 /branches/QAPAlgorithms/HeuristicLab.Services.Hive.DataAccess 6350-6627 /branches/Restructure trunk solution/HeuristicLab.Services.Hive.DataAccess 6828 /branches/RuntimeOptimizer/HeuristicLab.Services.Hive.DataAccess 8943-9078 /branches/ScatterSearch (trunk integration)/HeuristicLab.Services.Hive.DataAccess 7787-8333 /branches/SlaveShutdown/HeuristicLab.Services.Hive.DataAccess 8944-8956 /branches/SuccessProgressAnalysis/HeuristicLab.Services.Hive.DataAccess 5370-5682 /branches/Trunk/HeuristicLab.Services.Hive.DataAccess 6829-6865 /branches/UnloadJobs/HeuristicLab.Services.Hive.DataAccess 9168-9215 /branches/VNS/HeuristicLab.Services.Hive.DataAccess 5594-5752 /branches/histogram/HeuristicLab.Services.Hive.DataAccess 5959-6341
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
branches/OaaS/HeuristicLab.Services.Hive.DataAccess/3.3/HeuristicLab.Services.Hive.DataAccess-3.3.csproj
r8266 r9363 99 99 <None Include="Plugin.cs.frame" /> 100 100 <Compile Include="Enums\Command.cs" /> 101 <Compile Include="Enums\DowntimeType.cs" /> 101 102 <Compile Include="Enums\CpuArchitecture.cs" /> 102 103 <Compile Include="Plugin.cs" /> … … 157 158 </PropertyGroup> 158 159 <PropertyGroup> 159 <PreBuildEvent >set Path=%25Path%25;$(ProjectDir);$(SolutionDir)160 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir) 160 161 set ProjectDir=$(ProjectDir) 161 162 set SolutionDir=$(SolutionDir) … … 163 164 164 165 call PreBuildEvent.cmd</PreBuildEvent> 166 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' "> 167 export ProjectDir=$(ProjectDir) 168 export SolutionDir=$(SolutionDir) 169 170 $SolutionDir/PreBuildEvent.sh 171 </PreBuildEvent> 165 172 </PropertyGroup> 166 173 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
branches/OaaS/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.cs
r6983 r9363 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 1 22 using System; 2 23 using System.Data.Linq.Mapping; -
branches/OaaS/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml
r7916 r9363 42 42 <Association Name="Resource_Downtime" Member="Downtimes" Storage="_UptimeCalendars" ThisKey="ResourceId" OtherKey="ResourceId" Type="Downtime" /> 43 43 <Association Name="Resource_StateLog" Member="StateLogs" ThisKey="ResourceId" OtherKey="SlaveId" Type="StateLog" /> 44 <Association Name="Resource_ SlavePermission" Member="ResourcePermissions" ThisKey="ResourceId" OtherKey="ResourceId" Type="ResourcePermission" />44 <Association Name="Resource_ResourcePermission" Member="ResourcePermissions" ThisKey="ResourceId" OtherKey="ResourceId" Type="ResourcePermission" /> 45 45 <Association Name="Resource_Resource" Member="ParentResource" ThisKey="ParentResourceId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" /> 46 46 <Type Name="Slave" InheritanceCode="Slave" IsInheritanceDefault="true"> … … 95 95 <Column Name="Recurring" Type="System.Boolean" DbType="Bit" CanBeNull="false" /> 96 96 <Column Name="RecurringId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="false" /> 97 <Column Name="DowntimeType" Storage="_Type" Type="global::HeuristicLab.Services.Hive.DataAccess.DowntimeType" DbType="VarChar(MAX)" CanBeNull="false" /> 97 98 <Association Name="Resource_Downtime" Member="Resource" ThisKey="ResourceId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" DeleteRule="CASCADE" /> 98 99 </Type> … … 200 201 <Column Name="GrantedUserId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" /> 201 202 <Column Name="GrantedByUserId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" /> 202 <Association Name="Resource_SlavePermission" Member="Resource" ThisKey="ResourceId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" /> 203 <Association Name="Resource_ResourcePermission" Member="Resource" ThisKey="ResourceId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" /> 204 </Type> 205 </Table> 206 <Table Name="" Member="UserPriorities"> 207 <Type Name="UserPriority"> 208 <Column Name="UserId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" /> 209 <Column Name="DateEnqueued" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" /> 203 210 </Type> 204 211 </Table> -
branches/OaaS/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout
r7916 r9363 33 33 </nestedChildShapes> 34 34 </classShape> 35 <classShape Id="8d5712f7-7a1a-4a89-bd4d-fd60200d3306" absoluteBounds="13.5, 2.5, 2, 2. 1554996744791666">35 <classShape Id="8d5712f7-7a1a-4a89-bd4d-fd60200d3306" absoluteBounds="13.5, 2.5, 2, 2.3478011067708326"> 36 36 <DataClassMoniker Name="/HiveDataContext/Downtime" /> 37 37 <nestedChildShapes> 38 <elementListCompartment Id="7d8f121b-35bb-4753-a25f-3fac1562e68e" absoluteBounds="13.515, 2.9600000000000009, 1.9700000000000002, 1. 5954996744791665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />38 <elementListCompartment Id="7d8f121b-35bb-4753-a25f-3fac1562e68e" absoluteBounds="13.515, 2.9600000000000009, 1.9700000000000002, 1.7878011067708333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> 39 39 </nestedChildShapes> 40 40 </classShape> … … 57 57 </nestedChildShapes> 58 58 </classShape> 59 <inheritanceConnector edgePoints="[(11.25 : 1.98159912109375); (10.875 : 1.98159912109375)]" fixedFrom=" Algorithm" fixedTo="Algorithm" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">59 <inheritanceConnector edgePoints="[(11.25 : 1.98159912109375); (10.875 : 1.98159912109375)]" fixedFrom="NotFixed" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62"> 60 60 <nodes> 61 61 <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" /> … … 63 63 </nodes> 64 64 </inheritanceConnector> 65 <inheritanceConnector edgePoints="[(13.25 : 1.40469482421875); (13.5 : 1.40469482421875)]" fixedFrom=" Algorithm" fixedTo="Algorithm" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">65 <inheritanceConnector edgePoints="[(13.25 : 1.40469482421875); (13.5 : 1.40469482421875)]" fixedFrom="NotFixed" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62"> 66 66 <nodes> 67 67 <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" /> … … 121 121 </nestedChildShapes> 122 122 </classShape> 123 <associationConnector edgePoints="[(11.25 : 1. 45954756054688); (10.9375 : 1.45954756054688); (10.9375 : 0.6875); (2.75 : 0.6875); (2.75 : 1)]" fixedFrom="Algorithm" fixedTo="Algorithm">123 <associationConnector edgePoints="[(11.25 : 1.98159912109375); (10.9375 : 1.98159912109375); (10.9375 : 0.6875); (2.75 : 0.6875); (2.75 : 1)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 124 124 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_StateLog" /> 125 125 <nodes> … … 172 172 </nodes> 173 173 </associationConnector> 174 <associationConnector edgePoints="[(13.25 : 2.73159912109375); (13.5 : 2.73159912109375)]" fixedFrom=" Algorithm" fixedTo="Algorithm">174 <associationConnector edgePoints="[(13.25 : 2.73159912109375); (13.5 : 2.73159912109375)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 175 175 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_Downtime" /> 176 176 <nodes> … … 234 234 </nestedChildShapes> 235 235 </classShape> 236 <associationConnector edgePoints="[(12.5942481820367 : 2.9631982421875); (12.5942481820367 : 3.875)]" fixedFrom=" Algorithm" fixedTo="Algorithm">237 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_ SlavePermission" />236 <associationConnector edgePoints="[(12.5942481820367 : 2.9631982421875); (12.5942481820367 : 3.875)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 237 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_ResourcePermission" /> 238 238 <nodes> 239 239 <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" /> … … 241 241 </nodes> 242 242 </associationConnector> 243 <classShape Id="f9e8867f-fd15-4a72-8ca4-4f02cd3f141f" absoluteBounds="4.125, 5.5, 2, 1.1939925130208327"> 244 <DataClassMoniker Name="/HiveDataContext/UserPriority" /> 245 <nestedChildShapes> 246 <elementListCompartment Id="ee41f516-7d9c-4a1d-a1b8-bbe00a6ffea8" absoluteBounds="4.14, 5.96, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> 247 </nestedChildShapes> 248 </classShape> 243 249 </nestedChildShapes> 244 250 </ordesignerObjectsDiagram> -
branches/OaaS/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs
r7916 r9363 3 3 // <auto-generated> 4 4 // This code was generated by a tool. 5 // Runtime Version:4.0.30319. 2695 // Runtime Version:4.0.30319.17929 6 6 // 7 7 // Changes to this file may cause incorrect behavior and will be lost if … … 82 82 partial void UpdateResourcePermission(ResourcePermission instance); 83 83 partial void DeleteResourcePermission(ResourcePermission instance); 84 partial void InsertUserPriority(UserPriority instance); 85 partial void UpdateUserPriority(UserPriority instance); 86 partial void DeleteUserPriority(UserPriority instance); 84 87 #endregion 85 88 … … 247 250 { 248 251 return this.GetTable<ResourcePermission>(); 252 } 253 } 254 255 public System.Data.Linq.Table<UserPriority> UserPriorities 256 { 257 get 258 { 259 return this.GetTable<UserPriority>(); 249 260 } 250 261 } … … 1087 1098 } 1088 1099 1089 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_ SlavePermission", Storage="_ResourcePermissions", ThisKey="ResourceId", OtherKey="ResourceId")]1100 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_ResourcePermission", Storage="_ResourcePermissions", ThisKey="ResourceId", OtherKey="ResourceId")] 1090 1101 public EntitySet<ResourcePermission> ResourcePermissions 1091 1102 { … … 2153 2164 private System.Guid _RecurringId; 2154 2165 2166 private global::HeuristicLab.Services.Hive.DataAccess.DowntimeType _Type; 2167 2155 2168 private EntityRef<Resource> _Resource; 2156 2169 … … 2173 2186 partial void OnRecurringIdChanging(System.Guid value); 2174 2187 partial void OnRecurringIdChanged(); 2188 partial void OnDowntimeTypeChanging(global::HeuristicLab.Services.Hive.DataAccess.DowntimeType value); 2189 partial void OnDowntimeTypeChanged(); 2175 2190 #endregion 2176 2191 … … 2321 2336 this.SendPropertyChanged("RecurringId"); 2322 2337 this.OnRecurringIdChanged(); 2338 } 2339 } 2340 } 2341 2342 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Type", DbType="VarChar(MAX)", CanBeNull=false)] 2343 public global::HeuristicLab.Services.Hive.DataAccess.DowntimeType DowntimeType 2344 { 2345 get 2346 { 2347 return this._Type; 2348 } 2349 set 2350 { 2351 if ((this._Type != value)) 2352 { 2353 this.OnDowntimeTypeChanging(value); 2354 this.SendPropertyChanging(); 2355 this._Type = value; 2356 this.SendPropertyChanged("DowntimeType"); 2357 this.OnDowntimeTypeChanged(); 2323 2358 } 2324 2359 } … … 4359 4394 } 4360 4395 4361 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_ SlavePermission", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true)]4396 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_ResourcePermission", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true)] 4362 4397 public Resource Resource 4363 4398 { … … 4413 4448 } 4414 4449 } 4450 4451 [global::System.Data.Linq.Mapping.TableAttribute(Name="")] 4452 public partial class UserPriority : INotifyPropertyChanging, INotifyPropertyChanged 4453 { 4454 4455 private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); 4456 4457 private System.Guid _UserId; 4458 4459 private System.DateTime _DateEnqueued; 4460 4461 #region Extensibility Method Definitions 4462 partial void OnLoaded(); 4463 partial void OnValidate(System.Data.Linq.ChangeAction action); 4464 partial void OnCreated(); 4465 partial void OnUserIdChanging(System.Guid value); 4466 partial void OnUserIdChanged(); 4467 partial void OnDateEnqueuedChanging(System.DateTime value); 4468 partial void OnDateEnqueuedChanged(); 4469 #endregion 4470 4471 public UserPriority() 4472 { 4473 OnCreated(); 4474 } 4475 4476 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserId", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)] 4477 public System.Guid UserId 4478 { 4479 get 4480 { 4481 return this._UserId; 4482 } 4483 set 4484 { 4485 if ((this._UserId != value)) 4486 { 4487 this.OnUserIdChanging(value); 4488 this.SendPropertyChanging(); 4489 this._UserId = value; 4490 this.SendPropertyChanged("UserId"); 4491 this.OnUserIdChanged(); 4492 } 4493 } 4494 } 4495 4496 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DateEnqueued", DbType="DateTime NOT NULL")] 4497 public System.DateTime DateEnqueued 4498 { 4499 get 4500 { 4501 return this._DateEnqueued; 4502 } 4503 set 4504 { 4505 if ((this._DateEnqueued != value)) 4506 { 4507 this.OnDateEnqueuedChanging(value); 4508 this.SendPropertyChanging(); 4509 this._DateEnqueued = value; 4510 this.SendPropertyChanged("DateEnqueued"); 4511 this.OnDateEnqueuedChanged(); 4512 } 4513 } 4514 } 4515 4516 public event PropertyChangingEventHandler PropertyChanging; 4517 4518 public event PropertyChangedEventHandler PropertyChanged; 4519 4520 protected virtual void SendPropertyChanging() 4521 { 4522 if ((this.PropertyChanging != null)) 4523 { 4524 this.PropertyChanging(this, emptyChangingEventArgs); 4525 } 4526 } 4527 4528 protected virtual void SendPropertyChanged(String propertyName) 4529 { 4530 if ((this.PropertyChanged != null)) 4531 { 4532 this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); 4533 } 4534 } 4535 } 4415 4536 } 4416 4537 #pragma warning restore 1591 -
branches/OaaS/HeuristicLab.Services.Hive.DataAccess/3.3/ITransactionManager.cs
r7259 r9363 24 24 namespace HeuristicLab.Services.Hive.DataAccess { 25 25 public interface ITransactionManager { 26 void UseTransaction(Action call, bool serializable= false, bool longRunning = false);27 T UseTransaction<T>(Func<T> call, bool serializable= false, bool longRunning = false);26 void UseTransaction(Action call, bool repeatableRead = false, bool longRunning = false); 27 T UseTransaction<T>(Func<T> call, bool repeatableRead = false, bool longRunning = false); 28 28 } 29 29 } -
branches/OaaS/HeuristicLab.Services.Hive.DataAccess/3.3/Plugin.cs.frame
r7259 r9363 27 27 28 28 namespace HeuristicLab.Services.Hive.DataAccess { 29 [Plugin("HeuristicLab.Services.Hive.DataAccess", "3.3. 6.$WCREV$")]29 [Plugin("HeuristicLab.Services.Hive.DataAccess", "3.3.7.$WCREV$")] 30 30 [PluginFile("HeuristicLab.Services.Hive.DataAccess-3.3.dll", PluginFileType.Assembly)] 31 31 public class HeuristicLabServicesHiveDataAccessPlugin : PluginBase { -
branches/OaaS/HeuristicLab.Services.Hive.DataAccess/3.3/Properties/AssemblyInfo.cs.frame
r7259 r9363 55 55 // [assembly: AssemblyVersion("1.0.*")] 56 56 [assembly: AssemblyVersion("3.3.0.0")] 57 [assembly: AssemblyFileVersion("3.3. 6.$WCREV$")]57 [assembly: AssemblyFileVersion("3.3.7.$WCREV$")] -
branches/OaaS/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database.sql
r7916 r9363 75 75 [Recurring] Bit NOT NULL, 76 76 [RecurringId] UniqueIdentifier NOT NULL, 77 [DowntimeType] VarChar(MAX) NOT NULL, 77 78 CONSTRAINT [PK_dbo.Downtime] PRIMARY KEY ([DowntimeId]) 78 79 ) … … 120 121 [LastCleanup] DateTime NOT NULL, 121 122 CONSTRAINT [PK_Lifecycle] PRIMARY KEY ([LifecycleId]) 123 ) 124 CREATE TABLE [UserPriority]( 125 [UserId] UniqueIdentifier NOT NULL, 126 [DateEnqueued] DateTime NOT NULL, 127 CONSTRAINT [PK_UserPriority] PRIMARY KEY ([UserId]) 122 128 ) 123 129 CREATE TABLE [DeletedJobStatistics]( -
branches/OaaS/HeuristicLab.Services.Hive.DataAccess/3.3/SQL Scripts/Initialize Hive Database_SQL Azure.sql
r8232 r9363 74 74 [Recurring] Bit NOT NULL, 75 75 [RecurringId] UniqueIdentifier NOT NULL, 76 [DowntimeType] VarChar(MAX) NOT NULL, 76 77 CONSTRAINT [PK_dbo.Downtime] PRIMARY KEY ([DowntimeId]) 77 78 ) … … 119 120 [LastCleanup] DateTime NOT NULL, 120 121 CONSTRAINT [PK_Lifecycle] PRIMARY KEY ([LifecycleId]) 122 ) 123 CREATE TABLE [UserPriority]( 124 [UserId] UniqueIdentifier NOT NULL, 125 [DateEnqueued] DateTime NOT NULL, 126 CONSTRAINT [PK_UserPriority] PRIMARY KEY ([UserId]) 121 127 ) 122 128 CREATE TABLE [DeletedJobStatistics]( -
branches/OaaS/HeuristicLab.Services.Hive.DataAccess/3.3/TransactionManager.cs
r8326 r9363 25 25 namespace HeuristicLab.Services.Hive.DataAccess { 26 26 public class TransactionManager : ITransactionManager { 27 public void UseTransaction(Action call, bool serializable= false, bool longRunning = false) {27 public void UseTransaction(Action call, bool repeatableRead = false, bool longRunning = false) { 28 28 int n = 10; 29 29 while (n > 0) { 30 TransactionScope transaction = CreateTransaction( serializable, longRunning);30 TransactionScope transaction = CreateTransaction(repeatableRead, longRunning); 31 31 try { 32 32 call(); … … 45 45 } 46 46 47 public T UseTransaction<T>(Func<T> call, bool serializable= false, bool longRunning = false) {47 public T UseTransaction<T>(Func<T> call, bool repeatableRead = false, bool longRunning = false) { 48 48 int n = 10; 49 49 while (n > 0) { 50 TransactionScope transaction = CreateTransaction( serializable, longRunning);50 TransactionScope transaction = CreateTransaction(repeatableRead, longRunning); 51 51 try { 52 52 T result = call(); … … 67 67 } 68 68 69 private TransactionScope CreateTransaction(bool serializable, bool longRunning) {69 private TransactionScope CreateTransaction(bool repeatableRead, bool longRunning) { 70 70 var options = new TransactionOptions(); 71 if ( serializable)72 options.IsolationLevel = IsolationLevel. Serializable;71 if (repeatableRead) 72 options.IsolationLevel = IsolationLevel.RepeatableRead; 73 73 else 74 74 options.IsolationLevel = IsolationLevel.ReadUncommitted;
Note: See TracChangeset
for help on using the changeset viewer.