##// END OF EJS Templates
small fixes
cin -
r2:aa367305156b default
parent child
Show More
@@ -1,43 +1,44
1 <?xml version="1.0" encoding="utf-8"?>
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <PropertyGroup>
3 <PropertyGroup>
4 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
4 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6 <ProductVersion>10.0.0</ProductVersion>
6 <ProductVersion>10.0.0</ProductVersion>
7 <SchemaVersion>2.0</SchemaVersion>
7 <SchemaVersion>2.0</SchemaVersion>
8 <ProjectGuid>{99B95D0D-9CF9-4F70-8ADF-F4D0AA5CB0D9}</ProjectGuid>
8 <ProjectGuid>{99B95D0D-9CF9-4F70-8ADF-F4D0AA5CB0D9}</ProjectGuid>
9 <OutputType>Library</OutputType>
9 <OutputType>Library</OutputType>
10 <RootNamespace>Implab</RootNamespace>
10 <RootNamespace>Implab</RootNamespace>
11 <AssemblyName>Implab</AssemblyName>
11 <AssemblyName>Implab</AssemblyName>
12 </PropertyGroup>
12 </PropertyGroup>
13 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
13 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
14 <DebugSymbols>true</DebugSymbols>
14 <DebugSymbols>true</DebugSymbols>
15 <DebugType>full</DebugType>
15 <DebugType>full</DebugType>
16 <Optimize>false</Optimize>
16 <Optimize>false</Optimize>
17 <OutputPath>bin\Debug</OutputPath>
17 <OutputPath>bin\Debug</OutputPath>
18 <DefineConstants>DEBUG;</DefineConstants>
18 <DefineConstants>DEBUG;</DefineConstants>
19 <ErrorReport>prompt</ErrorReport>
19 <ErrorReport>prompt</ErrorReport>
20 <WarningLevel>4</WarningLevel>
20 <WarningLevel>4</WarningLevel>
21 <ConsolePause>false</ConsolePause>
21 <ConsolePause>false</ConsolePause>
22 </PropertyGroup>
22 </PropertyGroup>
23 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
23 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
24 <DebugType>full</DebugType>
24 <DebugType>full</DebugType>
25 <Optimize>true</Optimize>
25 <Optimize>true</Optimize>
26 <OutputPath>bin\Release</OutputPath>
26 <OutputPath>bin\Release</OutputPath>
27 <ErrorReport>prompt</ErrorReport>
27 <ErrorReport>prompt</ErrorReport>
28 <WarningLevel>4</WarningLevel>
28 <WarningLevel>4</WarningLevel>
29 <ConsolePause>false</ConsolePause>
29 <ConsolePause>false</ConsolePause>
30 </PropertyGroup>
30 </PropertyGroup>
31 <ItemGroup>
31 <ItemGroup>
32 <Reference Include="System" />
32 <Reference Include="System" />
33 </ItemGroup>
33 </ItemGroup>
34 <ItemGroup>
34 <ItemGroup>
35 <Compile Include="Properties\AssemblyInfo.cs" />
35 <Compile Include="Properties\AssemblyInfo.cs" />
36 <Compile Include="Promise.cs" />
36 <Compile Include="Promise.cs" />
37 <Compile Include="AsyncPool.cs" />
37 <Compile Include="AsyncPool.cs" />
38 <Compile Include="Safe.cs" />
38 </ItemGroup>
39 </ItemGroup>
39 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
40 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
40 <ItemGroup>
41 <ItemGroup>
41 <Folder Include="Parallels\" />
42 <Folder Include="Parallels\" />
42 </ItemGroup>
43 </ItemGroup>
43 </Project> No newline at end of file
44 </Project>
@@ -1,19 +1,20
1 using System;
1 using System;
2 using System.Collections.Generic;
2 using System.Collections.Generic;
3 using System.Linq;
3 using System.Linq;
4 using System.Text;
4 using System.Text;
5
5
6 namespace Implab
6 namespace Implab
7 {
7 {
8 public static class Safe
8 public static class Safe
9 {
9 {
10 public static void Dispose<T>(ref T obj) where T : IDisposable
10 public static void Dispose<T>(ref T obj) where T : class
11 {
11 {
12 if (obj != null)
12 var disp = obj as IDisposable;
13 if (disp != null)
13 {
14 {
14 obj.Dispose();
15 disp.Dispose();
15 obj = default(T);
16 obj = default(T);
16 }
17 }
17 }
18 }
18 }
19 }
19 }
20 }
General Comments 0
You need to be logged in to leave comments. Login now