diff options
author | mingchen | 2007-06-29 16:43:48 +0000 |
---|---|---|
committer | mingchen | 2007-06-29 16:43:48 +0000 |
commit | 6b3777d3db323f2054aeff1ba4be3e78edef21b8 (patch) | |
tree | 0b1f014042ba261a986b359dc24ecfed4c4e42ea /OpenSim/Framework/General | |
parent | * just making sure build files are latest (diff) | |
download | opensim-SC_OLD-6b3777d3db323f2054aeff1ba4be3e78edef21b8.zip opensim-SC_OLD-6b3777d3db323f2054aeff1ba4be3e78edef21b8.tar.gz opensim-SC_OLD-6b3777d3db323f2054aeff1ba4be3e78edef21b8.tar.bz2 opensim-SC_OLD-6b3777d3db323f2054aeff1ba4be3e78edef21b8.tar.xz |
*Deleted Logger.cs from OpenSim.Framework
Diffstat (limited to 'OpenSim/Framework/General')
-rw-r--r-- | OpenSim/Framework/General/Logger.cs | 85 | ||||
-rw-r--r-- | OpenSim/Framework/General/OpenSim.Framework.csproj | 59 | ||||
-rw-r--r-- | OpenSim/Framework/General/OpenSim.Framework.dll.build | 39 |
3 files changed, 47 insertions, 136 deletions
diff --git a/OpenSim/Framework/General/Logger.cs b/OpenSim/Framework/General/Logger.cs deleted file mode 100644 index e7eaa03..0000000 --- a/OpenSim/Framework/General/Logger.cs +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | |||
5 | namespace OpenSim.Framework | ||
6 | { | ||
7 | public class Logger | ||
8 | { | ||
9 | public static Logger Instance = new Logger( false ); | ||
10 | |||
11 | public delegate void LoggerMethodDelegate(); | ||
12 | private delegate bool LoggerDelegate( LoggerMethodDelegate whatToDo ); | ||
13 | |||
14 | |||
15 | private LoggerDelegate m_delegate; | ||
16 | |||
17 | public Logger( bool log ) | ||
18 | { | ||
19 | if( log ) | ||
20 | { | ||
21 | m_delegate = CatchAndLog; | ||
22 | } | ||
23 | else | ||
24 | { | ||
25 | m_delegate = DontCatch; | ||
26 | } | ||
27 | } | ||
28 | |||
29 | public bool Wrap( LoggerMethodDelegate whatToDo ) | ||
30 | { | ||
31 | return m_delegate( whatToDo ); | ||
32 | } | ||
33 | |||
34 | |||
35 | private bool CatchAndLog(LoggerMethodDelegate whatToDo) | ||
36 | { | ||
37 | try | ||
38 | { | ||
39 | whatToDo(); | ||
40 | return true; | ||
41 | } | ||
42 | catch(Exception e) | ||
43 | { | ||
44 | System.Console.WriteLine( "Exception logged!!! Woah!!!!" ); | ||
45 | return false; | ||
46 | } | ||
47 | } | ||
48 | |||
49 | private bool DontCatch(LoggerMethodDelegate whatToDo) | ||
50 | { | ||
51 | whatToDo(); | ||
52 | return true; | ||
53 | } | ||
54 | |||
55 | public class LoggerExample | ||
56 | { | ||
57 | public void TryWrap() | ||
58 | { | ||
59 | // This will log and ignore | ||
60 | Logger log = new Logger(true); | ||
61 | |||
62 | log.Wrap(delegate() | ||
63 | { | ||
64 | Int16.Parse("waa!"); | ||
65 | }); | ||
66 | |||
67 | // This will throw; | ||
68 | try | ||
69 | { | ||
70 | |||
71 | log = new Logger(false); | ||
72 | |||
73 | log.Wrap(delegate() | ||
74 | { | ||
75 | Int16.Parse("waa!"); | ||
76 | }); | ||
77 | } | ||
78 | catch | ||
79 | { | ||
80 | System.Console.WriteLine("Example barfed!"); | ||
81 | } | ||
82 | } | ||
83 | } | ||
84 | } | ||
85 | } | ||
diff --git a/OpenSim/Framework/General/OpenSim.Framework.csproj b/OpenSim/Framework/General/OpenSim.Framework.csproj index 48db634..c12d436 100644 --- a/OpenSim/Framework/General/OpenSim.Framework.csproj +++ b/OpenSim/Framework/General/OpenSim.Framework.csproj | |||
@@ -88,109 +88,106 @@ | |||
88 | </ProjectReference> | 88 | </ProjectReference> |
89 | </ItemGroup> | 89 | </ItemGroup> |
90 | <ItemGroup> | 90 | <ItemGroup> |
91 | <Compile Include="AgentInventory.cs"> | ||
92 | <SubType>Code</SubType> | ||
93 | </Compile> | ||
94 | <Compile Include="AuthenticateSessionBase.cs"> | 91 | <Compile Include="AuthenticateSessionBase.cs"> |
95 | <SubType>Code</SubType> | 92 | <SubType>Code</SubType> |
96 | </Compile> | 93 | </Compile> |
97 | <Compile Include="BlockingQueue.cs"> | 94 | <Compile Include="Remoting.cs"> |
98 | <SubType>Code</SubType> | 95 | <SubType>Code</SubType> |
99 | </Compile> | 96 | </Compile> |
100 | <Compile Include="IRegionCommsListener.cs"> | 97 | <Compile Include="RegionCommsListener.cs"> |
101 | <SubType>Code</SubType> | 98 | <SubType>Code</SubType> |
102 | </Compile> | 99 | </Compile> |
103 | <Compile Include="Logger.cs"> | 100 | <Compile Include="BlockingQueue.cs"> |
104 | <SubType>Code</SubType> | 101 | <SubType>Code</SubType> |
105 | </Compile> | 102 | </Compile> |
106 | <Compile Include="LoginService.cs"> | 103 | <Compile Include="IRegionCommsListener.cs"> |
107 | <SubType>Code</SubType> | 104 | <SubType>Code</SubType> |
108 | </Compile> | 105 | </Compile> |
109 | <Compile Include="RegionCommsListener.cs"> | 106 | <Compile Include="Util.cs"> |
110 | <SubType>Code</SubType> | 107 | <SubType>Code</SubType> |
111 | </Compile> | 108 | </Compile> |
112 | <Compile Include="Remoting.cs"> | 109 | <Compile Include="UserProfile.cs"> |
113 | <SubType>Code</SubType> | 110 | <SubType>Code</SubType> |
114 | </Compile> | 111 | </Compile> |
115 | <Compile Include="SimProfile.cs"> | 112 | <Compile Include="SimProfile.cs"> |
116 | <SubType>Code</SubType> | 113 | <SubType>Code</SubType> |
117 | </Compile> | 114 | </Compile> |
118 | <Compile Include="UserProfile.cs"> | 115 | <Compile Include="LoginService.cs"> |
119 | <SubType>Code</SubType> | 116 | <SubType>Code</SubType> |
120 | </Compile> | 117 | </Compile> |
121 | <Compile Include="Util.cs"> | 118 | <Compile Include="AgentInventory.cs"> |
122 | <SubType>Code</SubType> | 119 | <SubType>Code</SubType> |
123 | </Compile> | 120 | </Compile> |
124 | <Compile Include="Interfaces\AuthenticateResponse.cs"> | 121 | <Compile Include="Interfaces\AuthenticateResponse.cs"> |
125 | <SubType>Code</SubType> | 122 | <SubType>Code</SubType> |
126 | </Compile> | 123 | </Compile> |
127 | <Compile Include="Interfaces\IAssetServer.cs"> | 124 | <Compile Include="Interfaces\IUserServer.cs"> |
128 | <SubType>Code</SubType> | 125 | <SubType>Code</SubType> |
129 | </Compile> | 126 | </Compile> |
130 | <Compile Include="Interfaces\IClientAPI.cs"> | 127 | <Compile Include="Interfaces\IAssetServer.cs"> |
131 | <SubType>Code</SubType> | 128 | <SubType>Code</SubType> |
132 | </Compile> | 129 | </Compile> |
133 | <Compile Include="Interfaces\ILocalStorage.cs"> | 130 | <Compile Include="Interfaces\IWorld.cs"> |
134 | <SubType>Code</SubType> | 131 | <SubType>Code</SubType> |
135 | </Compile> | 132 | </Compile> |
136 | <Compile Include="Interfaces\IUserServer.cs"> | 133 | <Compile Include="Interfaces\IClientAPI.cs"> |
137 | <SubType>Code</SubType> | 134 | <SubType>Code</SubType> |
138 | </Compile> | 135 | </Compile> |
139 | <Compile Include="Interfaces\IWorld.cs"> | 136 | <Compile Include="Interfaces\ILocalStorage.cs"> |
140 | <SubType>Code</SubType> | 137 | <SubType>Code</SubType> |
141 | </Compile> | 138 | </Compile> |
142 | <Compile Include="Interfaces\Config\IGenericConfig.cs"> | 139 | <Compile Include="Interfaces\Config\IGenericConfig.cs"> |
143 | <SubType>Code</SubType> | 140 | <SubType>Code</SubType> |
144 | </Compile> | 141 | </Compile> |
145 | <Compile Include="Interfaces\Config\IGridConfig.cs"> | 142 | <Compile Include="Interfaces\Config\IUserConfig.cs"> |
146 | <SubType>Code</SubType> | 143 | <SubType>Code</SubType> |
147 | </Compile> | 144 | </Compile> |
148 | <Compile Include="Interfaces\Config\IUserConfig.cs"> | 145 | <Compile Include="Interfaces\Config\IGridConfig.cs"> |
149 | <SubType>Code</SubType> | 146 | <SubType>Code</SubType> |
150 | </Compile> | 147 | </Compile> |
151 | <Compile Include="Properties\AssemblyInfo.cs"> | 148 | <Compile Include="Properties\AssemblyInfo.cs"> |
152 | <SubType>Code</SubType> | 149 | <SubType>Code</SubType> |
153 | </Compile> | 150 | </Compile> |
154 | <Compile Include="Types\AgentCiruitData.cs"> | 151 | <Compile Include="Types\NeighbourInfo.cs"> |
155 | <SubType>Code</SubType> | 152 | <SubType>Code</SubType> |
156 | </Compile> | 153 | </Compile> |
157 | <Compile Include="Types\AgentWearable.cs"> | 154 | <Compile Include="Types\NetworkServersInfo.cs"> |
158 | <SubType>Code</SubType> | 155 | <SubType>Code</SubType> |
159 | </Compile> | 156 | </Compile> |
160 | <Compile Include="Types\AssetBase.cs"> | 157 | <Compile Include="Types\RegionHandle.cs"> |
161 | <SubType>Code</SubType> | 158 | <SubType>Code</SubType> |
162 | </Compile> | 159 | </Compile> |
163 | <Compile Include="Types\AssetLandmark.cs"> | 160 | <Compile Include="Types\RegionInfo.cs"> |
164 | <SubType>Code</SubType> | 161 | <SubType>Code</SubType> |
165 | </Compile> | 162 | </Compile> |
166 | <Compile Include="Types\AssetStorage.cs"> | 163 | <Compile Include="Types\ParcelData.cs"> |
167 | <SubType>Code</SubType> | 164 | <SubType>Code</SubType> |
168 | </Compile> | 165 | </Compile> |
169 | <Compile Include="Types\EstateSettings.cs"> | 166 | <Compile Include="Types\AgentWearable.cs"> |
170 | <SubType>Code</SubType> | 167 | <SubType>Code</SubType> |
171 | </Compile> | 168 | </Compile> |
172 | <Compile Include="Types\Login.cs"> | 169 | <Compile Include="Types\PrimData.cs"> |
173 | <SubType>Code</SubType> | 170 | <SubType>Code</SubType> |
174 | </Compile> | 171 | </Compile> |
175 | <Compile Include="Types\MapBlockData.cs"> | 172 | <Compile Include="Types\MapBlockData.cs"> |
176 | <SubType>Code</SubType> | 173 | <SubType>Code</SubType> |
177 | </Compile> | 174 | </Compile> |
178 | <Compile Include="Types\NeighbourInfo.cs"> | 175 | <Compile Include="Types\AssetStorage.cs"> |
179 | <SubType>Code</SubType> | 176 | <SubType>Code</SubType> |
180 | </Compile> | 177 | </Compile> |
181 | <Compile Include="Types\NetworkServersInfo.cs"> | 178 | <Compile Include="Types\EstateSettings.cs"> |
182 | <SubType>Code</SubType> | 179 | <SubType>Code</SubType> |
183 | </Compile> | 180 | </Compile> |
184 | <Compile Include="Types\ParcelData.cs"> | 181 | <Compile Include="Types\AgentCiruitData.cs"> |
185 | <SubType>Code</SubType> | 182 | <SubType>Code</SubType> |
186 | </Compile> | 183 | </Compile> |
187 | <Compile Include="Types\PrimData.cs"> | 184 | <Compile Include="Types\Login.cs"> |
188 | <SubType>Code</SubType> | 185 | <SubType>Code</SubType> |
189 | </Compile> | 186 | </Compile> |
190 | <Compile Include="Types\RegionHandle.cs"> | 187 | <Compile Include="Types\AssetLandmark.cs"> |
191 | <SubType>Code</SubType> | 188 | <SubType>Code</SubType> |
192 | </Compile> | 189 | </Compile> |
193 | <Compile Include="Types\RegionInfo.cs"> | 190 | <Compile Include="Types\AssetBase.cs"> |
194 | <SubType>Code</SubType> | 191 | <SubType>Code</SubType> |
195 | </Compile> | 192 | </Compile> |
196 | </ItemGroup> | 193 | </ItemGroup> |
diff --git a/OpenSim/Framework/General/OpenSim.Framework.dll.build b/OpenSim/Framework/General/OpenSim.Framework.dll.build index a18838b..0d8077b 100644 --- a/OpenSim/Framework/General/OpenSim.Framework.dll.build +++ b/OpenSim/Framework/General/OpenSim.Framework.dll.build | |||
@@ -11,41 +11,40 @@ | |||
11 | <resources prefix="OpenSim.Framework" dynamicprefix="true" > | 11 | <resources prefix="OpenSim.Framework" dynamicprefix="true" > |
12 | </resources> | 12 | </resources> |
13 | <sources failonempty="true"> | 13 | <sources failonempty="true"> |
14 | <include name="AgentInventory.cs" /> | ||
15 | <include name="AuthenticateSessionBase.cs" /> | 14 | <include name="AuthenticateSessionBase.cs" /> |
15 | <include name="Remoting.cs" /> | ||
16 | <include name="RegionCommsListener.cs" /> | ||
16 | <include name="BlockingQueue.cs" /> | 17 | <include name="BlockingQueue.cs" /> |
17 | <include name="IRegionCommsListener.cs" /> | 18 | <include name="IRegionCommsListener.cs" /> |
18 | <include name="Logger.cs" /> | ||
19 | <include name="LoginService.cs" /> | ||
20 | <include name="RegionCommsListener.cs" /> | ||
21 | <include name="Remoting.cs" /> | ||
22 | <include name="SimProfile.cs" /> | ||
23 | <include name="UserProfile.cs" /> | ||
24 | <include name="Util.cs" /> | 19 | <include name="Util.cs" /> |
20 | <include name="UserProfile.cs" /> | ||
21 | <include name="SimProfile.cs" /> | ||
22 | <include name="LoginService.cs" /> | ||
23 | <include name="AgentInventory.cs" /> | ||
25 | <include name="Interfaces/AuthenticateResponse.cs" /> | 24 | <include name="Interfaces/AuthenticateResponse.cs" /> |
25 | <include name="Interfaces/IUserServer.cs" /> | ||
26 | <include name="Interfaces/IAssetServer.cs" /> | 26 | <include name="Interfaces/IAssetServer.cs" /> |
27 | <include name="Interfaces/IWorld.cs" /> | ||
27 | <include name="Interfaces/IClientAPI.cs" /> | 28 | <include name="Interfaces/IClientAPI.cs" /> |
28 | <include name="Interfaces/ILocalStorage.cs" /> | 29 | <include name="Interfaces/ILocalStorage.cs" /> |
29 | <include name="Interfaces/IUserServer.cs" /> | ||
30 | <include name="Interfaces/IWorld.cs" /> | ||
31 | <include name="Interfaces/Config/IGenericConfig.cs" /> | 30 | <include name="Interfaces/Config/IGenericConfig.cs" /> |
32 | <include name="Interfaces/Config/IGridConfig.cs" /> | ||
33 | <include name="Interfaces/Config/IUserConfig.cs" /> | 31 | <include name="Interfaces/Config/IUserConfig.cs" /> |
32 | <include name="Interfaces/Config/IGridConfig.cs" /> | ||
34 | <include name="Properties/AssemblyInfo.cs" /> | 33 | <include name="Properties/AssemblyInfo.cs" /> |
35 | <include name="Types/AgentCiruitData.cs" /> | ||
36 | <include name="Types/AgentWearable.cs" /> | ||
37 | <include name="Types/AssetBase.cs" /> | ||
38 | <include name="Types/AssetLandmark.cs" /> | ||
39 | <include name="Types/AssetStorage.cs" /> | ||
40 | <include name="Types/EstateSettings.cs" /> | ||
41 | <include name="Types/Login.cs" /> | ||
42 | <include name="Types/MapBlockData.cs" /> | ||
43 | <include name="Types/NeighbourInfo.cs" /> | 34 | <include name="Types/NeighbourInfo.cs" /> |
44 | <include name="Types/NetworkServersInfo.cs" /> | 35 | <include name="Types/NetworkServersInfo.cs" /> |
45 | <include name="Types/ParcelData.cs" /> | ||
46 | <include name="Types/PrimData.cs" /> | ||
47 | <include name="Types/RegionHandle.cs" /> | 36 | <include name="Types/RegionHandle.cs" /> |
48 | <include name="Types/RegionInfo.cs" /> | 37 | <include name="Types/RegionInfo.cs" /> |
38 | <include name="Types/ParcelData.cs" /> | ||
39 | <include name="Types/AgentWearable.cs" /> | ||
40 | <include name="Types/PrimData.cs" /> | ||
41 | <include name="Types/MapBlockData.cs" /> | ||
42 | <include name="Types/AssetStorage.cs" /> | ||
43 | <include name="Types/EstateSettings.cs" /> | ||
44 | <include name="Types/AgentCiruitData.cs" /> | ||
45 | <include name="Types/Login.cs" /> | ||
46 | <include name="Types/AssetLandmark.cs" /> | ||
47 | <include name="Types/AssetBase.cs" /> | ||
49 | </sources> | 48 | </sources> |
50 | <references basedir="${project::get-base-directory()}"> | 49 | <references basedir="${project::get-base-directory()}"> |
51 | <lib> | 50 | <lib> |