* Rex merge, random bits and pieces
* Prebuild merged really badly - I think this may need some manual fixing yet.afrisby-3
parent
712b43ad2e
commit
b8b18356e6
|
@ -3,9 +3,10 @@ for your effort!)
|
||||||
|
|
||||||
Add your name in here if you have committed to OpenSim
|
Add your name in here if you have committed to OpenSim
|
||||||
|
|
||||||
|
|
||||||
OpenSim Developers
|
OpenSim Developers
|
||||||
|
|
||||||
* MW
|
* MW (Tribal Media AB)
|
||||||
* Adam Frisby (DeepThink Pty Ltd)
|
* Adam Frisby (DeepThink Pty Ltd)
|
||||||
* MingChen (DeepThink Pty Ltd)
|
* MingChen (DeepThink Pty Ltd)
|
||||||
* lbsa71 (Tribal Media AB)
|
* lbsa71 (Tribal Media AB)
|
||||||
|
@ -19,16 +20,32 @@ OpenSim Developers
|
||||||
* justincc (International Business Machines Corp.)
|
* justincc (International Business Machines Corp.)
|
||||||
* Teravus (w3z)
|
* Teravus (w3z)
|
||||||
* Johan Berntsson (3Di)
|
* Johan Berntsson (3Di)
|
||||||
|
* Ckrinke (Charles Krinke)
|
||||||
Patches
|
|
||||||
|
|
||||||
* Alondria
|
|
||||||
* BigFootAg
|
|
||||||
* CharlieO
|
|
||||||
* Danx0r
|
* Danx0r
|
||||||
* Dalien
|
* Dalien
|
||||||
* Darok
|
* Darok
|
||||||
|
* chi11ken (3Di)
|
||||||
|
* adjohn (3Di)
|
||||||
|
* Alondria
|
||||||
|
|
||||||
|
|
||||||
|
Patches
|
||||||
|
|
||||||
|
* BigFootAg
|
||||||
|
* CharlieO
|
||||||
* jhurliman (LLSD Login)
|
* jhurliman (LLSD Login)
|
||||||
|
* kinoc
|
||||||
|
* daTwitch
|
||||||
|
* mikkopa/_someone - RealXtend
|
||||||
|
* openlifegrid.com
|
||||||
|
* Dr Scofield (International Business Machines Corp.)
|
||||||
|
* Daedius
|
||||||
|
* alex_carnell
|
||||||
|
* webmage (International Business Machines Corp.)
|
||||||
|
* jimbo2120 (International Business Machines Corp.)
|
||||||
|
* brianw/Sir_Ahzz
|
||||||
|
* ChrisDown
|
||||||
|
|
||||||
|
|
||||||
LSL Devs
|
LSL Devs
|
||||||
|
|
||||||
|
@ -36,10 +53,12 @@ LSL Devs
|
||||||
* CharlieO
|
* CharlieO
|
||||||
* Tedd
|
* Tedd
|
||||||
|
|
||||||
|
|
||||||
Testers
|
Testers
|
||||||
|
|
||||||
* Ckrinke
|
* Ckrinke
|
||||||
* CharlieO (LSL)
|
* CharlieO (LSL)
|
||||||
|
* openlifegrid.com
|
||||||
|
|
||||||
|
|
||||||
This software uses components from the following developers:
|
This software uses components from the following developers:
|
||||||
|
@ -53,6 +72,7 @@ This software uses components from the following developers:
|
||||||
* Prebuild ( http://sourceforge.net/projects/dnpb/ )
|
* Prebuild ( http://sourceforge.net/projects/dnpb/ )
|
||||||
* LibSecondLife ( http://www.libsecondlife.org/wiki/Main_Page )
|
* LibSecondLife ( http://www.libsecondlife.org/wiki/Main_Page )
|
||||||
|
|
||||||
|
|
||||||
In addition, we would like to thank:
|
In addition, we would like to thank:
|
||||||
* The Mono Project
|
* The Mono Project
|
||||||
* The NANT Developers
|
* The NANT Developers
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
Copyright (c) Contributors, http://opensimulator.org/
|
||||||
|
See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
* Neither the name of the OpenSim Project nor the
|
||||||
|
names of its contributors may be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
|
||||||
|
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||||
|
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||||
|
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
|
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -547,6 +547,8 @@ namespace Prebuild.Core.Targets
|
||||||
ss.WriteLine(" <include name=\"OpenSim*.exe\"/>");
|
ss.WriteLine(" <include name=\"OpenSim*.exe\"/>");
|
||||||
ss.WriteLine(" <include name=\"ScriptEngines/*\"/>");
|
ss.WriteLine(" <include name=\"ScriptEngines/*\"/>");
|
||||||
ss.WriteLine(" <include name=\"Physics/*\"/>");
|
ss.WriteLine(" <include name=\"Physics/*\"/>");
|
||||||
|
ss.WriteLine(" <exclude name=\"OpenSim.32BitLaunch.exe\"/>");
|
||||||
|
ss.WriteLine(" <exclude name=\"ScriptEngines/Default.lsl\"/>");
|
||||||
ss.WriteLine(" </fileset>");
|
ss.WriteLine(" </fileset>");
|
||||||
ss.WriteLine(" </delete>");
|
ss.WriteLine(" </delete>");
|
||||||
ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />");
|
ss.WriteLine(" <delete dir=\"${obj.dir}\" failonerror=\"false\" />");
|
||||||
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
Welcome to OpenSim!
|
||||||
|
|
||||||
|
Version 0.5
|
||||||
|
|
||||||
|
== OVERVIEW ==
|
||||||
|
|
||||||
|
OpenSim is a BSD Licensed Open Source project to develop a functioning
|
||||||
|
virtual worlds server platform capable of supporting multiple clients
|
||||||
|
and servers in a heterogeneous grid structure. OpenSim is written in
|
||||||
|
C#, and can run under Mono or the Microsoft .NET runtimes.
|
||||||
|
|
||||||
|
This is considered an alpha release. Some stuff works, a lot
|
||||||
|
doesn't. If it breaks, you get to keep *both* pieces.
|
||||||
|
|
||||||
|
== Installation on Windows ==
|
||||||
|
|
||||||
|
Prereqs:
|
||||||
|
|
||||||
|
* Load OpenSim.sln into Visual Studio .NET and build the solution.
|
||||||
|
* chdir bin
|
||||||
|
* OpenSim.exe
|
||||||
|
|
||||||
|
See configuring OpenSim
|
||||||
|
|
||||||
|
== Installation on Linux ==
|
||||||
|
|
||||||
|
Prereqs:
|
||||||
|
* Mono >= 1.2.3.1
|
||||||
|
* Nant >= 0.85
|
||||||
|
* sqlite3
|
||||||
|
|
||||||
|
From the distribution type:
|
||||||
|
* nant
|
||||||
|
* cd bin
|
||||||
|
* mono ./OpenSim.exe
|
||||||
|
|
||||||
|
See configuring OpenSim
|
||||||
|
|
||||||
|
== Configuring OpenSim ==
|
||||||
|
|
||||||
|
When OpenSim starts for the first time, you will be prompted with a
|
||||||
|
series of questions that look something like:
|
||||||
|
|
||||||
|
[09-17 03:54:40] DEFAULT REGION CONFIG: Simulator Name [OpenSim Test]:
|
||||||
|
|
||||||
|
At each of these you must provide you own value or just hit enter to
|
||||||
|
take the default (in this case "OpenSim Test").
|
||||||
|
|
||||||
|
YOUR SIM WILL NOT BE STARTED UNTIL YOU ANSWER ALL QUESTIONS
|
||||||
|
|
||||||
|
Once you are presented with a prompt that looks like:
|
||||||
|
|
||||||
|
Region# :
|
||||||
|
|
||||||
|
You have successfully started OpenSim.
|
||||||
|
|
||||||
|
== Connecting to your OpenSim ==
|
||||||
|
|
||||||
|
By default your sim will be running on http://127.0.0.1:9000. To use
|
||||||
|
your OpenSim add -loginuri http://127.0.0.1:9000 to your second life
|
||||||
|
client (running on the same machine as your OpenSim).
|
||||||
|
|
||||||
|
== More Information on OpenSim ==
|
||||||
|
|
||||||
|
More extensive information on building, running, and configuring
|
||||||
|
OpenSim, as well as how to report bugs, and participate in the OpenSim
|
||||||
|
project can always be found at http://opensimulator.org.
|
||||||
|
|
||||||
|
Thanks for trying OpenSim, we hope it was a pleasant experience.
|
|
@ -0,0 +1,24 @@
|
||||||
|
==TESTING==
|
||||||
|
To use nunit testing on opensim code, you have a variety of methods. The easiast methods involve using IDE capabilities to test code. Using VS2005/2008 I recommend using the testing capabilities of Resarper(commercial) or TestDriven.Net(free). Both will recognize nunit tests within your application and allow you to test them individually, or all at once, etc. You will also be able to step into debug mode into a test through these add-ins enabling a developer to jump right in and see how a specific test-case/scenerio works.
|
||||||
|
|
||||||
|
Additionally, it is my understanding that sharpdevelop and monodevelop have their own nunit testing plugins within their IDE. Though I am not certain of their exact feature set or stability.
|
||||||
|
|
||||||
|
== Using NUnit Directly ==
|
||||||
|
The NUnit project is a very mature testing application. It can be obtained from www.nunit.org are via various package distrobutions for Linux. Please be sure to get a .Net 2.0 version of Nunit, as OpenSim makes use of .Net 2.0 functionality.
|
||||||
|
|
||||||
|
Nunit comes with 2 tools that will enable you to run tests from assembly inputs. Nunit-gui and nunit-console. NUnit-gui is a console that will let you view the execution of various tests within your assemblies and give visual indication of teir success or failure. This is a useful tool for those who lack IDE addins ( or lack IDEs at all ).
|
||||||
|
|
||||||
|
Nunit console allows you to execute the nunit tests of assemblies via console. Its output will show test failures and successes and a summary of what happened. This is very useful for a quick overview and/or automated testing.
|
||||||
|
|
||||||
|
Windows
|
||||||
|
Windows version of nunit-console is by default .Net 2.0 if you downloaded the .Net 2.0 version of Nunit. Be sure to setup your PATH environment variable.
|
||||||
|
|
||||||
|
Linux & OSX
|
||||||
|
On these operating systems you will have to use the command "nunit-console2"
|
||||||
|
|
||||||
|
Example
|
||||||
|
|
||||||
|
nunit-console2 OpenSim.Framework.Tests.dll (on linux)
|
||||||
|
nunit-console OpenSim.Framework.Tests.dll (on windows)
|
||||||
|
|
||||||
|
For more information on testing contact the autor of this testing readme: Daedius Moskvitch ( daedius @@@@ daedius com)
|
|
@ -0,0 +1,127 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Tribal Media AB, http://tribalmedia.se/
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * The name of Tribal Media AB may not be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Data;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace TribalMedia.Framework.Data
|
||||||
|
{
|
||||||
|
public class BaseDataReader
|
||||||
|
{
|
||||||
|
private readonly IDataReader m_source;
|
||||||
|
|
||||||
|
public BaseDataReader(IDataReader source)
|
||||||
|
{
|
||||||
|
m_source = source;
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Get(string name)
|
||||||
|
{
|
||||||
|
return m_source[name];
|
||||||
|
}
|
||||||
|
|
||||||
|
public ushort GetUShort(string name)
|
||||||
|
{
|
||||||
|
return (ushort)m_source.GetInt32(m_source.GetOrdinal(name));
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte GetByte(string name)
|
||||||
|
{
|
||||||
|
int ordinal = m_source.GetOrdinal(name);
|
||||||
|
byte value = (byte)m_source.GetInt16(ordinal);
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public sbyte GetSByte(string name)
|
||||||
|
{
|
||||||
|
return (sbyte)m_source.GetInt16(m_source.GetOrdinal(name));
|
||||||
|
}
|
||||||
|
|
||||||
|
public float GetFloat(string name)
|
||||||
|
{
|
||||||
|
return m_source.GetFloat(m_source.GetOrdinal(name));
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte[] GetBytes(string name)
|
||||||
|
{
|
||||||
|
int ordinal = m_source.GetOrdinal(name);
|
||||||
|
|
||||||
|
if (m_source.GetValue(ordinal) == DBNull.Value)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
byte[] buffer = new byte[16384];
|
||||||
|
|
||||||
|
MemoryStream memStream = new MemoryStream();
|
||||||
|
|
||||||
|
long totalRead = 0;
|
||||||
|
|
||||||
|
int bytesRead;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
bytesRead = (int)m_source.GetBytes(ordinal, totalRead, buffer, 0, buffer.Length);
|
||||||
|
totalRead += bytesRead;
|
||||||
|
|
||||||
|
memStream.Write(buffer, 0, bytesRead);
|
||||||
|
} while (bytesRead == buffer.Length);
|
||||||
|
|
||||||
|
return memStream.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetString(string name)
|
||||||
|
{
|
||||||
|
int ordinal = m_source.GetOrdinal(name);
|
||||||
|
object value = m_source.GetValue(ordinal);
|
||||||
|
|
||||||
|
if (value is DBNull)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (string)value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Read()
|
||||||
|
{
|
||||||
|
return m_source.Read();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Guid GetGuid(string name)
|
||||||
|
{
|
||||||
|
string guidString = GetString(name);
|
||||||
|
if (String.IsNullOrEmpty(guidString))
|
||||||
|
{
|
||||||
|
return Guid.Empty;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new Guid(guidString);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,142 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Tribal Media AB, http://tribalmedia.se/
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * The name of Tribal Media AB may not be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
namespace TribalMedia.Framework.Data
|
||||||
|
{
|
||||||
|
public abstract class BaseDatabaseConnector
|
||||||
|
{
|
||||||
|
protected string m_connectionString;
|
||||||
|
|
||||||
|
public BaseDatabaseConnector(string connectionString)
|
||||||
|
{
|
||||||
|
m_connectionString = connectionString;
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract DbConnection GetNewConnection();
|
||||||
|
public abstract string CreateParamName(string fieldName);
|
||||||
|
|
||||||
|
public DbCommand CreateSelectCommand(BaseTableMapper mapper, DbConnection connection, string fieldName, object key)
|
||||||
|
{
|
||||||
|
string table = mapper.TableName;
|
||||||
|
|
||||||
|
DbCommand command = connection.CreateCommand();
|
||||||
|
|
||||||
|
string conditionString = CreateCondition(mapper, command, fieldName, key);
|
||||||
|
|
||||||
|
string query =
|
||||||
|
String.Format("select * from {0} where {1}", table, conditionString);
|
||||||
|
|
||||||
|
command.CommandText = query;
|
||||||
|
command.CommandType = CommandType.Text;
|
||||||
|
|
||||||
|
return command;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string CreateCondition(BaseTableMapper mapper, DbCommand command, string fieldName, object key)
|
||||||
|
{
|
||||||
|
string keyFieldParamName = mapper.CreateParamName(fieldName);
|
||||||
|
|
||||||
|
DbParameter param = command.CreateParameter();
|
||||||
|
param.ParameterName = keyFieldParamName;
|
||||||
|
param.Value = ConvertToDbType(key);
|
||||||
|
command.Parameters.Add(param);
|
||||||
|
|
||||||
|
return String.Format("{0}={1}", fieldName, keyFieldParamName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DbCommand CreateUpdateCommand(BaseTableMapper mapper, DbConnection connection, object rowMapper, object primaryKey)
|
||||||
|
{
|
||||||
|
string table = mapper.TableName;
|
||||||
|
|
||||||
|
List<string> fieldNames = new List<string>();
|
||||||
|
|
||||||
|
DbCommand command = connection.CreateCommand();
|
||||||
|
|
||||||
|
foreach (BaseFieldMapper fieldMapper in mapper.Schema.Fields.Values)
|
||||||
|
{
|
||||||
|
if (fieldMapper != mapper.KeyFieldMapper)
|
||||||
|
{
|
||||||
|
fieldMapper.ExpandField(rowMapper, command, fieldNames);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<string> assignments = new List<string>();
|
||||||
|
|
||||||
|
foreach (string field in fieldNames)
|
||||||
|
{
|
||||||
|
assignments.Add(String.Format("{0}={1}", field, mapper.CreateParamName(field)));
|
||||||
|
}
|
||||||
|
|
||||||
|
string conditionString = mapper.CreateCondition(command, mapper.KeyFieldMapper.FieldName, primaryKey);
|
||||||
|
|
||||||
|
command.CommandText =
|
||||||
|
String.Format("update {0} set {1} where {2}", table, String.Join(", ", assignments.ToArray()),
|
||||||
|
conditionString);
|
||||||
|
|
||||||
|
return command;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DbCommand CreateInsertCommand(BaseTableMapper mapper, DbConnection connection, object obj)
|
||||||
|
{
|
||||||
|
string table = mapper.TableName;
|
||||||
|
|
||||||
|
List<string> fieldNames = new List<string>();
|
||||||
|
|
||||||
|
DbCommand command = connection.CreateCommand();
|
||||||
|
|
||||||
|
foreach (BaseFieldMapper fieldMapper in mapper.Schema.Fields.Values)
|
||||||
|
{
|
||||||
|
fieldMapper.ExpandField(obj, command, fieldNames);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<string> paramNames = new List<string>();
|
||||||
|
|
||||||
|
foreach (string field in fieldNames)
|
||||||
|
{
|
||||||
|
paramNames.Add(mapper.CreateParamName(field));
|
||||||
|
}
|
||||||
|
|
||||||
|
command.CommandText =
|
||||||
|
String.Format("insert into {0} ({1}) values ({2})", table, String.Join(", ", fieldNames.ToArray()),
|
||||||
|
String.Join(", ", paramNames.ToArray()));
|
||||||
|
|
||||||
|
return command;
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual object ConvertToDbType(object value)
|
||||||
|
{
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract BaseDataReader CreateReader(IDataReader reader);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,163 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Tribal Media AB, http://tribalmedia.se/
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * The name of Tribal Media AB may not be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data.Common;
|
||||||
|
|
||||||
|
namespace TribalMedia.Framework.Data
|
||||||
|
{
|
||||||
|
public delegate TField ObjectGetAccessor<TObj, TField>(TObj obj);
|
||||||
|
public delegate void ObjectSetAccessor<TObj, TField>(TObj obj, TField value);
|
||||||
|
|
||||||
|
public abstract class BaseFieldMapper
|
||||||
|
{
|
||||||
|
private readonly BaseTableMapper m_tableMapper;
|
||||||
|
private readonly string m_fieldName;
|
||||||
|
|
||||||
|
public string FieldName
|
||||||
|
{
|
||||||
|
get { return m_fieldName; }
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Type m_valueType;
|
||||||
|
|
||||||
|
public Type ValueType
|
||||||
|
{
|
||||||
|
get { return m_valueType; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract object GetParamValue(object obj);
|
||||||
|
|
||||||
|
public BaseFieldMapper(BaseTableMapper tableMapper, string fieldName, Type valueType)
|
||||||
|
{
|
||||||
|
m_fieldName = fieldName;
|
||||||
|
m_valueType = valueType;
|
||||||
|
m_tableMapper = tableMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract void SetPropertyFromReader(object mapper, BaseDataReader reader);
|
||||||
|
|
||||||
|
public void RawAddParam(DbCommand command, List<string> fieldNames, string fieldName, object value)
|
||||||
|
{
|
||||||
|
string paramName = m_tableMapper.CreateParamName(fieldName);
|
||||||
|
fieldNames.Add(fieldName);
|
||||||
|
|
||||||
|
DbParameter param = command.CreateParameter();
|
||||||
|
param.ParameterName = paramName;
|
||||||
|
param.Value = value;
|
||||||
|
|
||||||
|
command.Parameters.Add(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual void ExpandField<TObj>(TObj obj, DbCommand command, List<string> fieldNames)
|
||||||
|
{
|
||||||
|
string fieldName = FieldName;
|
||||||
|
object value = GetParamValue(obj);
|
||||||
|
|
||||||
|
RawAddParam(command, fieldNames, fieldName, m_tableMapper.ConvertToDbType(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual object GetValue(BaseDataReader reader)
|
||||||
|
{
|
||||||
|
object value;
|
||||||
|
|
||||||
|
if (ValueType == typeof(Guid))
|
||||||
|
{
|
||||||
|
value = reader.GetGuid(m_fieldName);
|
||||||
|
}
|
||||||
|
else if (ValueType == typeof(bool))
|
||||||
|
{
|
||||||
|
uint boolVal = reader.GetUShort(m_fieldName);
|
||||||
|
value = (boolVal == 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (ValueType == typeof(byte))
|
||||||
|
{
|
||||||
|
value = reader.GetByte(m_fieldName);
|
||||||
|
}
|
||||||
|
else if (ValueType == typeof(sbyte))
|
||||||
|
{
|
||||||
|
value = reader.GetSByte(m_fieldName);
|
||||||
|
}
|
||||||
|
else if (ValueType == typeof(ushort))
|
||||||
|
{
|
||||||
|
value = reader.GetUShort(m_fieldName);
|
||||||
|
}
|
||||||
|
else if (ValueType == typeof(byte[]))
|
||||||
|
{
|
||||||
|
value = reader.GetBytes(m_fieldName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
value = reader.Get(m_fieldName);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (value is DBNull)
|
||||||
|
{
|
||||||
|
value = default(ValueType);
|
||||||
|
}
|
||||||
|
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ObjectField<TObject, TField> : BaseFieldMapper
|
||||||
|
{
|
||||||
|
private readonly ObjectGetAccessor<TObject, TField> m_fieldGetAccessor;
|
||||||
|
private readonly ObjectSetAccessor<TObject, TField> m_fieldSetAccessor;
|
||||||
|
|
||||||
|
public override object GetParamValue(object obj)
|
||||||
|
{
|
||||||
|
return m_fieldGetAccessor((TObject)obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void SetPropertyFromReader(object obj, BaseDataReader reader)
|
||||||
|
{
|
||||||
|
object value;
|
||||||
|
|
||||||
|
value = GetValue(reader);
|
||||||
|
|
||||||
|
if (value == null)
|
||||||
|
{
|
||||||
|
m_fieldSetAccessor((TObject)obj, default(TField));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_fieldSetAccessor((TObject)obj, (TField)value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ObjectField(BaseTableMapper tableMapper, string fieldName, ObjectGetAccessor<TObject, TField> rowMapperGetAccessor,
|
||||||
|
ObjectSetAccessor<TObject, TField> rowMapperSetAccessor)
|
||||||
|
: base(tableMapper, fieldName, typeof(TField))
|
||||||
|
{
|
||||||
|
m_fieldGetAccessor = rowMapperGetAccessor;
|
||||||
|
m_fieldSetAccessor = rowMapperSetAccessor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,60 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Tribal Media AB, http://tribalmedia.se/
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * The name of Tribal Media AB may not be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
using TribalMedia.Framework.Data;
|
||||||
|
|
||||||
|
namespace TribalMedia.Framework.Data
|
||||||
|
{
|
||||||
|
public abstract class BaseRowMapper
|
||||||
|
{
|
||||||
|
public abstract void FillObject(BaseDataReader reader);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class BaseRowMapper<TObj> : BaseRowMapper
|
||||||
|
{
|
||||||
|
private readonly BaseSchema m_schema;
|
||||||
|
private readonly TObj m_obj;
|
||||||
|
|
||||||
|
public TObj Object
|
||||||
|
{
|
||||||
|
get { return m_obj; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public BaseRowMapper(BaseSchema schema, TObj obj)
|
||||||
|
{
|
||||||
|
m_schema = schema;
|
||||||
|
m_obj = obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void FillObject(BaseDataReader reader)
|
||||||
|
{
|
||||||
|
foreach (BaseFieldMapper fieldMapper in m_schema.Fields.Values)
|
||||||
|
{
|
||||||
|
fieldMapper.SetPropertyFromReader(this, reader);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,68 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Tribal Media AB, http://tribalmedia.se/
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * The name of Tribal Media AB may not be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using TribalMedia.Framework.Data;
|
||||||
|
|
||||||
|
namespace TribalMedia.Framework.Data
|
||||||
|
{
|
||||||
|
public class BaseSchema
|
||||||
|
{
|
||||||
|
protected BaseTableMapper m_tableMapper;
|
||||||
|
protected Dictionary<string, BaseFieldMapper> m_mappings;
|
||||||
|
|
||||||
|
public Dictionary<string, BaseFieldMapper> Fields
|
||||||
|
{
|
||||||
|
get { return m_mappings; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public BaseSchema(BaseTableMapper tableMapper)
|
||||||
|
{
|
||||||
|
m_mappings = new Dictionary<string, BaseFieldMapper>();
|
||||||
|
m_tableMapper = tableMapper;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class BaseSchema<TObj> : BaseSchema
|
||||||
|
{
|
||||||
|
public BaseSchema(BaseTableMapper tableMapper)
|
||||||
|
: base(tableMapper)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObjectField<TObj, TField> AddMapping<TField>(string fieldName,
|
||||||
|
ObjectGetAccessor<TObj, TField> rowMapperGetAccessor,
|
||||||
|
ObjectSetAccessor<TObj, TField> rowMapperSetAccessor)
|
||||||
|
{
|
||||||
|
ObjectField<TObj, TField> rowMapperField =
|
||||||
|
new ObjectField<TObj, TField>(m_tableMapper, fieldName, rowMapperGetAccessor, rowMapperSetAccessor);
|
||||||
|
|
||||||
|
m_mappings.Add(fieldName, rowMapperField);
|
||||||
|
|
||||||
|
return rowMapperField;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,280 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Tribal Media AB, http://tribalmedia.se/
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * The name of Tribal Media AB may not be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.Common;
|
||||||
|
using TribalMedia.Framework.Data;
|
||||||
|
|
||||||
|
namespace TribalMedia.Framework.Data
|
||||||
|
{
|
||||||
|
public abstract class BaseTableMapper
|
||||||
|
{
|
||||||
|
private readonly BaseDatabaseConnector m_database;
|
||||||
|
private readonly object m_syncRoot = new object();
|
||||||
|
|
||||||
|
protected void WithConnection(Action<DbConnection> action)
|
||||||
|
{
|
||||||
|
lock (m_syncRoot)
|
||||||
|
{
|
||||||
|
DbConnection m_connection = m_database.GetNewConnection();
|
||||||
|
|
||||||
|
if (m_connection.State != ConnectionState.Open)
|
||||||
|
{
|
||||||
|
m_connection.Open();
|
||||||
|
}
|
||||||
|
|
||||||
|
action(m_connection);
|
||||||
|
|
||||||
|
if (m_connection.State == ConnectionState.Open)
|
||||||
|
{
|
||||||
|
m_connection.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private readonly string m_tableName;
|
||||||
|
public string TableName
|
||||||
|
{
|
||||||
|
get { return m_tableName; }
|
||||||
|
}
|
||||||
|
|
||||||
|
protected BaseSchema m_schema;
|
||||||
|
public BaseSchema Schema
|
||||||
|
{
|
||||||
|
get { return m_schema; }
|
||||||
|
}
|
||||||
|
|
||||||
|
protected BaseFieldMapper m_keyFieldMapper;
|
||||||
|
public BaseFieldMapper KeyFieldMapper
|
||||||
|
{
|
||||||
|
get { return m_keyFieldMapper; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public BaseTableMapper(BaseDatabaseConnector database, string tableName)
|
||||||
|
{
|
||||||
|
m_database = database;
|
||||||
|
m_tableName = tableName.ToLower(); // Stupid MySQL hack.
|
||||||
|
}
|
||||||
|
|
||||||
|
public string CreateParamName(string fieldName)
|
||||||
|
{
|
||||||
|
return m_database.CreateParamName(fieldName);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected DbCommand CreateSelectCommand(DbConnection connection, string fieldName, object primaryKey)
|
||||||
|
{
|
||||||
|
return m_database.CreateSelectCommand(this, connection, fieldName, primaryKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
public string CreateCondition(DbCommand command, string fieldName, object key)
|
||||||
|
{
|
||||||
|
return m_database.CreateCondition(this, command, fieldName, key);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DbCommand CreateInsertCommand(DbConnection connection, object obj)
|
||||||
|
{
|
||||||
|
return m_database.CreateInsertCommand(this, connection, obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DbCommand CreateUpdateCommand(DbConnection connection, object rowMapper, object primaryKey)
|
||||||
|
{
|
||||||
|
return m_database.CreateUpdateCommand(this, connection, rowMapper, primaryKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ConvertToDbType(object value)
|
||||||
|
{
|
||||||
|
return m_database.ConvertToDbType(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual BaseDataReader CreateReader(IDataReader reader)
|
||||||
|
{
|
||||||
|
return m_database.CreateReader(reader);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract class BaseTableMapper<TRowMapper, TPrimaryKey> : BaseTableMapper
|
||||||
|
{
|
||||||
|
public BaseTableMapper(BaseDatabaseConnector database, string tableName)
|
||||||
|
: base(database, tableName)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// HACK: This is a temporary function used by TryGetValue().
|
||||||
|
// Due to a bug in mono 1.2.6, delegate blocks cannot contain
|
||||||
|
// a using() block. This has been fixed in SVN, so the next
|
||||||
|
// mono release should work.
|
||||||
|
private void TryGetConnectionValue(DbConnection connection, TPrimaryKey primaryKey, ref TRowMapper result, ref bool success)
|
||||||
|
{
|
||||||
|
using (
|
||||||
|
DbCommand command =
|
||||||
|
CreateSelectCommand(connection, KeyFieldMapper.FieldName, primaryKey))
|
||||||
|
{
|
||||||
|
using (IDataReader reader = command.ExecuteReader())
|
||||||
|
{
|
||||||
|
if (reader.Read())
|
||||||
|
{
|
||||||
|
result = FromReader( CreateReader(reader));
|
||||||
|
success = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
success = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool TryGetValue(TPrimaryKey primaryKey, out TRowMapper value)
|
||||||
|
{
|
||||||
|
TRowMapper result = default(TRowMapper);
|
||||||
|
bool success = false;
|
||||||
|
|
||||||
|
WithConnection(delegate(DbConnection connection)
|
||||||
|
{
|
||||||
|
TryGetConnectionValue(connection, primaryKey, ref result, ref success);
|
||||||
|
});
|
||||||
|
|
||||||
|
value = result;
|
||||||
|
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
// HACK: This is a temporary function used by Remove().
|
||||||
|
// Due to a bug in mono 1.2.6, delegate blocks cannot contain
|
||||||
|
// a using() block. This has been fixed in SVN, so the next
|
||||||
|
// mono release should work.
|
||||||
|
protected virtual void TryDelete(DbConnection connection, TPrimaryKey id, ref int deleted)
|
||||||
|
{
|
||||||
|
using (
|
||||||
|
DbCommand command =
|
||||||
|
CreateDeleteCommand(connection, KeyFieldMapper.FieldName, id))
|
||||||
|
{
|
||||||
|
deleted = command.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual bool Remove(TPrimaryKey id)
|
||||||
|
{
|
||||||
|
int deleted = 0;
|
||||||
|
|
||||||
|
WithConnection(delegate(DbConnection connection)
|
||||||
|
{
|
||||||
|
TryDelete(connection, id, ref deleted);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (deleted == 1)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public DbCommand CreateDeleteCommand(DbConnection connection, string fieldName, TPrimaryKey primaryKey)
|
||||||
|
{
|
||||||
|
string table = TableName;
|
||||||
|
|
||||||
|
DbCommand command = connection.CreateCommand();
|
||||||
|
|
||||||
|
string conditionString = CreateCondition(command, fieldName, primaryKey);
|
||||||
|
|
||||||
|
string query =
|
||||||
|
String.Format("delete from {0} where {1}", table, conditionString);
|
||||||
|
|
||||||
|
command.CommandText = query;
|
||||||
|
command.CommandType = CommandType.Text;
|
||||||
|
|
||||||
|
return command;
|
||||||
|
}
|
||||||
|
|
||||||
|
// HACK: This is a temporary function used by Update().
|
||||||
|
// Due to a bug in mono 1.2.6, delegate blocks cannot contain
|
||||||
|
// a using() block. This has been fixed in SVN, so the next
|
||||||
|
// mono release should work.
|
||||||
|
protected void TryUpdate(DbConnection connection, TPrimaryKey primaryKey, TRowMapper value, ref int updated)
|
||||||
|
{
|
||||||
|
using (DbCommand command = CreateUpdateCommand(connection, value, primaryKey))
|
||||||
|
{
|
||||||
|
updated = command.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual bool Update(TPrimaryKey primaryKey, TRowMapper value)
|
||||||
|
{
|
||||||
|
int updated = 0;
|
||||||
|
|
||||||
|
WithConnection(delegate(DbConnection connection)
|
||||||
|
{
|
||||||
|
TryUpdate(connection, primaryKey, value, ref updated);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (updated == 1)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// HACK: This is a temporary function used by Add().
|
||||||
|
// Due to a bug in mono 1.2.6, delegate blocks cannot contain
|
||||||
|
// a using() block. This has been fixed in SVN, so the next
|
||||||
|
// mono release should work.
|
||||||
|
protected void TryAdd(DbConnection connection, TRowMapper value, ref int added)
|
||||||
|
{
|
||||||
|
using (DbCommand command = CreateInsertCommand(connection, value))
|
||||||
|
{
|
||||||
|
added = command.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual bool Add(TRowMapper value)
|
||||||
|
{
|
||||||
|
int added = 0;
|
||||||
|
|
||||||
|
WithConnection(delegate(DbConnection connection)
|
||||||
|
{
|
||||||
|
TryAdd(connection, value, ref added);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (added == 1)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract TRowMapper FromReader(BaseDataReader reader);
|
||||||
|
}
|
||||||
|
}
|
66
ThirdParty/TribalMedia/TribalMedia.Framework.Data/Properties/AssemblyInfo.cs
vendored
Normal file
66
ThirdParty/TribalMedia/TribalMedia.Framework.Data/Properties/AssemblyInfo.cs
vendored
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Tribal Media AB, http://tribalmedia.se/
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * The name of Tribal Media AB may not be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Security;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
|
||||||
|
[assembly : AssemblyTitle("TribalMedia.Framework.Data")]
|
||||||
|
[assembly : AssemblyDescription("Generic Database Abstraction Layer")]
|
||||||
|
[assembly : AssemblyConfiguration("")]
|
||||||
|
[assembly : AssemblyCompany("TribalMedia")]
|
||||||
|
[assembly : AssemblyProduct("TribalMedia.Framework.Data")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2007 Tribal Media")]
|
||||||
|
[assembly : AssemblyTrademark("")]
|
||||||
|
[assembly : AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
|
||||||
|
[assembly : ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
|
||||||
|
[assembly : Guid("9269f421-19d9-4eea-bfe3-c0ffe426fada")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
|
// by using the '*' as shown below:
|
||||||
|
|
||||||
|
[assembly : AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly : AssemblyFileVersion("1.0.0.0")]
|
||||||
|
[assembly : AllowPartiallyTrustedCallers]
|
BIN
ThirdParty/TribalMedia/TribalMedia.Framework.Data/TribalMedia.Framework.Data.snk
vendored
Normal file
BIN
ThirdParty/TribalMedia/TribalMedia.Framework.Data/TribalMedia.Framework.Data.snk
vendored
Normal file
Binary file not shown.
319
prebuild.xml
319
prebuild.xml
|
@ -1,6 +1,7 @@
|
||||||
|
<<<<<<< .working
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" version="1.7">
|
<Prebuild xmlns="http://dnpb.sourceforge.net/schemas/prebuild-1.7.xsd" version="1.7">
|
||||||
<Solution name="OpenSim" activeConfig="Debug" path="./" version="0.4.0-svn">
|
<Solution name="OpenSim" activeConfig="Debug" path="./" version="0.5.0-svn">
|
||||||
<Configuration name="Debug">
|
<Configuration name="Debug">
|
||||||
<Options>
|
<Options>
|
||||||
<CompilerDefines>TRACE;DEBUG</CompilerDefines>
|
<CompilerDefines>TRACE;DEBUG</CompilerDefines>
|
||||||
|
@ -48,6 +49,7 @@
|
||||||
|
|
||||||
<ReferencePath>../../../bin/</ReferencePath>
|
<ReferencePath>../../../bin/</ReferencePath>
|
||||||
<Reference name="System" localCopy="false"/>
|
<Reference name="System" localCopy="false"/>
|
||||||
|
<Reference name="log4net"/>
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
|
@ -74,11 +76,108 @@
|
||||||
<Reference name="XMLRPC.dll"/>
|
<Reference name="XMLRPC.dll"/>
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="Nini.dll" />
|
<Reference name="Nini.dll" />
|
||||||
|
<Reference name="log4net"/>
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="false"/>
|
<Match pattern="*.cs" recurse="false"/>
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
<Project name="OpenSim.Tests.Common" path="OpenSim/Tests/Common" type="Library">
|
||||||
|
<Configuration name="Debug">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../../../bin/</OutputPath>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration name="Release">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../../../bin/</OutputPath>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
|
||||||
|
<ReferencePath>../../../bin/</ReferencePath>
|
||||||
|
<Reference name="System"/>
|
||||||
|
<Reference name="System.Xml"/>
|
||||||
|
<Reference name="System.Data"/>
|
||||||
|
<Reference name="nunit.framework.dll" />
|
||||||
|
<Reference name="libsecondlife.dll"/>
|
||||||
|
<Files>
|
||||||
|
<Match pattern="*.cs" recurse="false"/>
|
||||||
|
</Files>
|
||||||
|
</Project>
|
||||||
|
|
||||||
|
<Project name="OpenSim.Framework.Tests" path="OpenSim/Tests/OpenSim/Framework" type="Library">
|
||||||
|
<Configuration name="Debug">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../../../../bin/</OutputPath>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration name="Release">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../../../../bin/</OutputPath>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
|
||||||
|
<ReferencePath>../../../../bin/</ReferencePath>
|
||||||
|
<Reference name="System"/>
|
||||||
|
<Reference name="System.Xml"/>
|
||||||
|
<Reference name="System.Data"/>
|
||||||
|
<Reference name="libsecondlife.dll"/>
|
||||||
|
<Reference name="Db4objects.Db4o.dll"/>
|
||||||
|
<Reference name="XMLRPC.dll"/>
|
||||||
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
|
<Reference name="OpenSim.Framework"/>
|
||||||
|
<Reference name="OpenSim.Tests.Common"/>
|
||||||
|
<Reference name="Nini.dll" />
|
||||||
|
<Reference name="nunit.framework.dll" />
|
||||||
|
<Files>
|
||||||
|
<Match pattern="*.cs" recurse="false"/>
|
||||||
|
</Files>
|
||||||
|
</Project>
|
||||||
|
|
||||||
|
<Project name="OpenSim.Framework.Statistics" path="OpenSim/Framework/Statistics" type="Library">
|
||||||
|
<Configuration name="Debug">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../../../bin/</OutputPath>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration name="Release">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../../../bin/</OutputPath>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
|
||||||
|
<ReferencePath>../../../bin/</ReferencePath>
|
||||||
|
<Reference name="System"/>
|
||||||
|
<Reference name="libsecondlife.dll"/>
|
||||||
|
<Reference name="OpenSim.Framework"/>
|
||||||
|
|
||||||
|
<Files>
|
||||||
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
</Files>
|
||||||
|
</Project>
|
||||||
|
|
||||||
|
<Project name="TribalMedia.Framework.Data" path="ThirdParty/TribalMedia/TribalMedia.Framework.Data" type="Library">
|
||||||
|
<Configuration name="Debug">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../../../bin/</OutputPath>
|
||||||
|
<KeyFile>TribalMedia.Framework.Data.snk</KeyFile>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration name="Release">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../../../bin/</OutputPath>
|
||||||
|
<KeyFile>TribalMedia.Framework.Data.snk</KeyFile>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
|
||||||
|
<ReferencePath>../../../bin/</ReferencePath>
|
||||||
|
<Reference name="System" localCopy="false"/>
|
||||||
|
<Reference name="System.Data"/>
|
||||||
|
<Files>
|
||||||
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
</Files>
|
||||||
|
</Project>
|
||||||
|
|
||||||
<Project name="OpenSim.Framework.Data" path="OpenSim/Framework/Data" type="Library">
|
<Project name="OpenSim.Framework.Data" path="OpenSim/Framework/Data" type="Library">
|
||||||
<Configuration name="Debug">
|
<Configuration name="Debug">
|
||||||
<Options>
|
<Options>
|
||||||
|
@ -98,6 +197,9 @@
|
||||||
<Reference name="XMLRPC.dll"/>
|
<Reference name="XMLRPC.dll"/>
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
<Reference name="OpenSim.Framework"/>
|
<Reference name="OpenSim.Framework"/>
|
||||||
|
<Reference name="MySql.Data.dll"/>
|
||||||
|
<Reference name="TribalMedia.Framework.Data"/>
|
||||||
|
<Reference name="log4net"/>
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
|
@ -129,7 +231,7 @@
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
<Project name="OpenSim.Framework.Configuration.HTTP" path="OpenSim/Framework/Configuration/HTTP" type="Library">
|
<Project name="OpenSim.Framework.Configuration.HTTP" path="OpenSim/Framework/Configuration/HTTP" type="Library">
|
||||||
<Configuration name="Debug">
|
<Configuration name="Debug">
|
||||||
<Options>
|
<Options>
|
||||||
<OutputPath>../../../../bin/</OutputPath>
|
<OutputPath>../../../../bin/</OutputPath>
|
||||||
|
@ -151,6 +253,7 @@
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="OpenSim.Framework.Configuration.XML"/>
|
<Reference name="OpenSim.Framework.Configuration.XML"/>
|
||||||
<Reference name="OpenSim.Framework.Data"/>
|
<Reference name="OpenSim.Framework.Data"/>
|
||||||
|
<Reference name="log4net"/>
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
|
@ -175,7 +278,7 @@
|
||||||
<Reference name="OpenSim.Framework"/>
|
<Reference name="OpenSim.Framework"/>
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
<Reference name="Nini.dll" />
|
<Reference name="Nini.dll" />
|
||||||
|
<Reference name="log4net"/>
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
|
@ -202,6 +305,7 @@
|
||||||
<Reference name="OpenSim.Framework"/>
|
<Reference name="OpenSim.Framework"/>
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="Nini.dll" />
|
<Reference name="Nini.dll" />
|
||||||
|
<Reference name="log4net"/>
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
|
@ -252,13 +356,13 @@
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
<Reference name="XMLRPC.dll"/>
|
<Reference name="XMLRPC.dll"/>
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
|
||||||
<Project name="OpenSim.Region.Physics.Manager" path="OpenSim/Region/Physics/Manager" type="Library">
|
<Project name="OpenSim.Region.Physics.Manager" path="OpenSim/Region/Physics/Manager" type="Library">
|
||||||
<Configuration name="Debug">
|
<Configuration name="Debug">
|
||||||
<Options>
|
<Options>
|
||||||
|
@ -278,8 +382,10 @@
|
||||||
<Reference name="Axiom.MathLib.dll" localCopy="false"/>
|
<Reference name="Axiom.MathLib.dll" localCopy="false"/>
|
||||||
<Reference name="OpenSim.Framework" localCopy="false"/>
|
<Reference name="OpenSim.Framework" localCopy="false"/>
|
||||||
<Reference name="OpenSim.Framework.Console" localCopy="false"/>
|
<Reference name="OpenSim.Framework.Console" localCopy="false"/>
|
||||||
<Reference name="Nini.dll" />
|
<Reference name="Nini.dll" />
|
||||||
<Files>
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="false"/>
|
<Match pattern="*.cs" recurse="false"/>
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -374,7 +480,9 @@
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="OpenSim.Region.Physics.Manager" localCopy="false"/>
|
<Reference name="OpenSim.Region.Physics.Manager" localCopy="false"/>
|
||||||
<Reference name="Ode.NET.dll" localCopy="false" />
|
<Reference name="Ode.NET.dll" localCopy="false" />
|
||||||
|
<Reference name="log4net"/>
|
||||||
<Reference name="RexDotMeshLoader.dll" localCopy="false" />
|
<Reference name="RexDotMeshLoader.dll" localCopy="false" />
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
|
@ -396,11 +504,12 @@
|
||||||
<Reference name="System" localCopy="false"/>
|
<Reference name="System" localCopy="false"/>
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
<Reference name="Axiom.MathLib.dll" localCopy="false"/>
|
<Reference name="Axiom.MathLib.dll" localCopy="false"/>
|
||||||
<Reference name="OpenSim.Framework"/>
|
<Reference name="OpenSim.Framework"/>
|
||||||
<Reference name="OpenSim.Framework.Console" localCopy="false"/>
|
<Reference name="OpenSim.Framework.Console" localCopy="false"/>
|
||||||
<Reference name="OpenSim.Region.Physics.Manager" localCopy="false"/>
|
<Reference name="OpenSim.Region.Physics.Manager" localCopy="false"/>
|
||||||
<Reference name="Modified.XnaDevRu.BulletX.dll" localCopy="false" />
|
<Reference name="Modified.XnaDevRu.BulletX.dll" localCopy="false" />
|
||||||
<Reference name="MonoXnaCompactMaths.dll" localCopy="false" />
|
<Reference name="MonoXnaCompactMaths.dll" localCopy="false" />
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
@ -424,9 +533,10 @@
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
<Reference name="OpenSim.Framework"/>
|
<Reference name="OpenSim.Framework"/>
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="OpenSim.Region.Physics.Manager" localCopy="false"/>
|
<Reference name="OpenSim.Region.Physics.Manager" localCopy="false"/>
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -480,6 +590,8 @@
|
||||||
<Reference name="OpenSim.Framework.Data"/>
|
<Reference name="OpenSim.Framework.Data"/>
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
<Reference name="Db4objects.Db4o.dll"/>
|
<Reference name="Db4objects.Db4o.dll"/>
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
|
@ -507,10 +619,12 @@
|
||||||
<Reference name="OpenSim.Framework.Data" />
|
<Reference name="OpenSim.Framework.Data" />
|
||||||
<Reference name="OpenSim.Framework.Servers"/>
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
|
<Reference name="OpenSim.Framework.Statistics"/>
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
<Reference name="Db4objects.Db4o.dll"/>
|
<Reference name="Db4objects.Db4o.dll"/>
|
||||||
<Reference name="Nini.dll" />
|
<Reference name="Nini.dll" />
|
||||||
<Reference name="XMLRPC.dll"/>
|
<Reference name="XMLRPC.dll"/>
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
@ -532,13 +646,15 @@
|
||||||
<ReferencePath>../../../../bin/</ReferencePath>
|
<ReferencePath>../../../../bin/</ReferencePath>
|
||||||
<Reference name="System"/>
|
<Reference name="System"/>
|
||||||
<Reference name="System.Xml"/>
|
<Reference name="System.Xml"/>
|
||||||
<Reference name="OpenSim.Framework.Communications"/>
|
|
||||||
<Reference name="OpenSim.Framework"/>
|
<Reference name="OpenSim.Framework"/>
|
||||||
|
<Reference name="OpenSim.Framework.Communications"/>
|
||||||
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="OpenSim.Framework.Data" />
|
<Reference name="OpenSim.Framework.Data" />
|
||||||
<Reference name="OpenSim.Framework.Servers"/>
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Statistics"/>
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
<Reference name="XMLRPC.dll"/>
|
<Reference name="XMLRPC.dll"/>
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
@ -568,9 +684,9 @@
|
||||||
<Reference name="OpenSim.Framework.Servers"/>
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
<Reference name="OpenSim.Framework.Communications" />
|
<Reference name="OpenSim.Framework.Communications" />
|
||||||
<Reference name="OpenSim.Region.Communications.Local" />
|
<Reference name="OpenSim.Region.Communications.Local" />
|
||||||
|
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
<Reference name="XMLRPC.dll"/>
|
<Reference name="XMLRPC.dll"/>
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
@ -606,7 +722,9 @@
|
||||||
<Reference name="Microsoft.JScript"/>
|
<Reference name="Microsoft.JScript"/>
|
||||||
<Reference name="XMLRPC.dll"/>
|
<Reference name="XMLRPC.dll"/>
|
||||||
<Reference name="OpenSim.Framework.Communications"/>
|
<Reference name="OpenSim.Framework.Communications"/>
|
||||||
|
<Reference name="TribalMedia.Framework.Data"/>
|
||||||
<Reference name="Nini.dll" />
|
<Reference name="Nini.dll" />
|
||||||
|
<Reference name="log4net"/>
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
|
@ -638,14 +756,15 @@
|
||||||
<Reference name="OpenSim.Framework.Servers"/>
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="OpenSim.Framework.Communications"/>
|
<Reference name="OpenSim.Framework.Communications"/>
|
||||||
|
<Reference name="OpenSim.Framework.Statistics"/>
|
||||||
<Reference name="OpenSim.Framework.ServerStatus"/>
|
<Reference name="OpenSim.Framework.ServerStatus"/>
|
||||||
<Reference name="OpenSim.Region.Communications.Local"/>
|
<Reference name="OpenSim.Region.Communications.Local"/>
|
||||||
<Reference name="OpenSim.Region.Physics.Manager"/>
|
<Reference name="OpenSim.Region.Physics.Manager"/>
|
||||||
<Reference name="XMLRPC.dll"/>
|
<Reference name="XMLRPC.dll"/>
|
||||||
<Reference name="Nini.dll" />
|
<Reference name="Nini.dll" />
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
|
<Files>
|
||||||
<Files>
|
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -670,39 +789,13 @@
|
||||||
<Reference name="OpenSim.Framework"/>
|
<Reference name="OpenSim.Framework"/>
|
||||||
<Reference name="OpenSim.Region.Environment"/>
|
<Reference name="OpenSim.Region.Environment"/>
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
|
||||||
<Project name="OpenSim.DataStore.MonoSqlite" path="OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite" type="Library">
|
|
||||||
<Configuration name="Debug">
|
|
||||||
<Options>
|
|
||||||
<OutputPath>../../../../bin/</OutputPath>
|
|
||||||
</Options>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration name="Release">
|
|
||||||
<Options>
|
|
||||||
<OutputPath>../../../../bin/</OutputPath>
|
|
||||||
</Options>
|
|
||||||
</Configuration>
|
|
||||||
|
|
||||||
<ReferencePath>../../../../bin/</ReferencePath>
|
|
||||||
<Reference name="System" localCopy="false"/>
|
|
||||||
<Reference name="System.Xml"/>
|
|
||||||
<Reference name="System.Data"/>
|
|
||||||
<Reference name="Mono.Data.SqliteClient"/>
|
|
||||||
<Reference name="libsecondlife.dll"/>
|
|
||||||
<Reference name="OpenSim.Framework"/>
|
|
||||||
<Reference name="OpenSim.Region.Environment"/>
|
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
|
||||||
<Files>
|
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
|
||||||
</Files>
|
|
||||||
</Project>
|
|
||||||
|
|
||||||
|
|
||||||
<Project name="OpenSim.DataStore.MSSQL" path="OpenSim/Region/Storage/OpenSim.DataStore.MSSQL" type="Library">
|
<Project name="OpenSim.DataStore.MSSQL" path="OpenSim/Region/Storage/OpenSim.DataStore.MSSQL" type="Library">
|
||||||
<Configuration name="Debug">
|
<Configuration name="Debug">
|
||||||
<Options>
|
<Options>
|
||||||
|
@ -724,6 +817,8 @@
|
||||||
<Reference name="OpenSim.Framework.Data"/>
|
<Reference name="OpenSim.Framework.Data"/>
|
||||||
<Reference name="OpenSim.Region.Environment"/>
|
<Reference name="OpenSim.Region.Environment"/>
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
|
@ -751,6 +846,8 @@
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="Axiom.MathLib.dll"/>
|
<Reference name="Axiom.MathLib.dll"/>
|
||||||
<Reference name="Nini.dll"/>
|
<Reference name="Nini.dll"/>
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
|
@ -782,6 +879,7 @@
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="OpenSim.Region.Physics.Manager"/>
|
<Reference name="OpenSim.Region.Physics.Manager"/>
|
||||||
<Reference name="OpenSim.Framework.Servers"/>
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
|
<Reference name="OpenSim.Framework.Statistics"/>
|
||||||
<Reference name="OpenSim.Region.Environment"/>
|
<Reference name="OpenSim.Region.Environment"/>
|
||||||
<Reference name="OpenSim.Region.ClientStack"/>
|
<Reference name="OpenSim.Region.ClientStack"/>
|
||||||
<Reference name="OpenSim.Framework.Communications"/>
|
<Reference name="OpenSim.Framework.Communications"/>
|
||||||
|
@ -790,6 +888,8 @@
|
||||||
<Reference name="XMLRPC.dll"/>
|
<Reference name="XMLRPC.dll"/>
|
||||||
<Reference name="OpenSim.Region.Communications.Local"/>
|
<Reference name="OpenSim.Region.Communications.Local"/>
|
||||||
<Reference name="Nini.dll" />
|
<Reference name="Nini.dll" />
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
|
@ -820,6 +920,9 @@
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="OpenSim.Framework.RegionLoader.Filesystem"/>
|
<Reference name="OpenSim.Framework.RegionLoader.Filesystem"/>
|
||||||
<Reference name="OpenSim.Framework.RegionLoader.Web"/>
|
<Reference name="OpenSim.Framework.RegionLoader.Web"/>
|
||||||
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
|
@ -850,6 +953,8 @@
|
||||||
<Reference name="OpenSim.Framework"/>
|
<Reference name="OpenSim.Framework"/>
|
||||||
<Reference name="OpenSim.Framework.Servers"/>
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
|
@ -884,12 +989,14 @@
|
||||||
<Reference name="OpenSim.Region.Physics.Manager"/>
|
<Reference name="OpenSim.Region.Physics.Manager"/>
|
||||||
<Reference name="XMLRPC.dll"/>
|
<Reference name="XMLRPC.dll"/>
|
||||||
<Reference name="OpenSim.Framework.Servers"/>
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
|
<Reference name="OpenSim.Framework.Statistics"/>
|
||||||
<Reference name="OpenSim.Framework.Communications"/>
|
<Reference name="OpenSim.Framework.Communications"/>
|
||||||
<Reference name="OpenSim.Region.Communications.Local"/>
|
<Reference name="OpenSim.Region.Communications.Local"/>
|
||||||
<Reference name="OpenSim.Region.ClientStack"/>
|
<Reference name="OpenSim.Region.ClientStack"/>
|
||||||
<Reference name="OpenSim.Region.Environment"/>
|
<Reference name="OpenSim.Region.Environment"/>
|
||||||
<Reference name="OpenSim.Region.Terrain.BasicTerrain"/>
|
<Reference name="OpenSim.Region.Terrain.BasicTerrain"/>
|
||||||
<Reference name="Nini.dll" />
|
<Reference name="Nini.dll" />
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
@ -914,10 +1021,12 @@
|
||||||
<Reference name="System.Data"/>
|
<Reference name="System.Data"/>
|
||||||
<Reference name="OpenSim.Framework"/>
|
<Reference name="OpenSim.Framework"/>
|
||||||
<Reference name="OpenSim.Framework.Data"/>
|
<Reference name="OpenSim.Framework.Data"/>
|
||||||
|
<!-- <Reference name="TribalMedia.Framework.Data"/> -->
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
<Reference name="MySql.Data.dll"/>
|
<Reference name="MySql.Data.dll"/>
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="OpenSim.Region.Environment"/>
|
<Reference name="OpenSim.Region.Environment"/>
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
@ -945,6 +1054,7 @@
|
||||||
<Reference name="OpenSim.Framework.Data"/>
|
<Reference name="OpenSim.Framework.Data"/>
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
@ -972,16 +1082,19 @@
|
||||||
<Reference name="OpenSim.Framework.Data"/>
|
<Reference name="OpenSim.Framework.Data"/>
|
||||||
<Reference name="OpenSim.Framework"/>
|
<Reference name="OpenSim.Framework"/>
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
|
<Reference name="OpenSim.Region.Environment"/>
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
<Reference name="Mono.Data.SqliteClient"/>
|
<Reference name="Mono.Data.SqliteClient"/>
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
<Match path="Resources" pattern="*.sql" buildAction="EmbeddedResource"/>
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
<!-- OGS projects -->
|
<!-- OGS projects -->
|
||||||
|
|
||||||
|
|
||||||
<Project name="OpenSim.Grid.GridServer" path="OpenSim/Grid/GridServer" type="Exe">
|
<Project name="OpenSim.Grid.GridServer" path="OpenSim/Grid/GridServer" type="Exe">
|
||||||
<Configuration name="Debug">
|
<Configuration name="Debug">
|
||||||
<Options>
|
<Options>
|
||||||
|
@ -1005,6 +1118,7 @@
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
<Reference name="Db4objects.Db4o.dll"/>
|
<Reference name="Db4objects.Db4o.dll"/>
|
||||||
<Reference name="XMLRPC.dll"/>
|
<Reference name="XMLRPC.dll"/>
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
@ -1032,7 +1146,9 @@
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="OpenSim.Framework.Servers"/>
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
<Reference name="OpenSim.Framework.Communications"/>
|
<Reference name="OpenSim.Framework.Communications"/>
|
||||||
|
<Reference name="OpenSim.Framework.Statistics"/>
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
@ -1061,9 +1177,11 @@
|
||||||
<Reference name="OpenSim.Framework.Communications"/>
|
<Reference name="OpenSim.Framework.Communications"/>
|
||||||
<Reference name="OpenSim.Framework.Data"/>
|
<Reference name="OpenSim.Framework.Data"/>
|
||||||
<Reference name="OpenSim.Framework.Servers"/>
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
|
<Reference name="OpenSim.Framework.Statistics"/>
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
<Reference name="Db4objects.Db4o.dll"/>
|
<Reference name="Db4objects.Db4o.dll"/>
|
||||||
<Reference name="XMLRPC.dll"/>
|
<Reference name="XMLRPC.dll"/>
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
@ -1092,6 +1210,7 @@
|
||||||
<Reference name="OpenSim.Framework.Data"/>
|
<Reference name="OpenSim.Framework.Data"/>
|
||||||
<Reference name="OpenSim.Framework.Servers"/>
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
@ -1121,6 +1240,7 @@
|
||||||
<Reference name="OpenSim.Framework.Servers"/>
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
<Reference name="XMLRPC.dll"/>
|
<Reference name="XMLRPC.dll"/>
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
@ -1143,16 +1263,27 @@
|
||||||
<ReferencePath>../../../../bin/ScriptEngines/</ReferencePath>
|
<ReferencePath>../../../../bin/ScriptEngines/</ReferencePath>
|
||||||
<Reference name="System" localCopy="false"/>
|
<Reference name="System" localCopy="false"/>
|
||||||
<Reference name="System.Data" localCopy="false"/>
|
<Reference name="System.Data" localCopy="false"/>
|
||||||
|
<Reference name="System.Web" localCopy="false"/>
|
||||||
<Reference name="System.Xml" localCopy="false"/>
|
<Reference name="System.Xml" localCopy="false"/>
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
|
<Reference name="OpenSim" />
|
||||||
<Reference name="OpenSim.Framework"/>
|
<Reference name="OpenSim.Framework"/>
|
||||||
|
<Reference name="OpenSim.Framework.Communications"/>
|
||||||
|
<Reference name="OpenSim.Region.Environment" />
|
||||||
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
|
<Reference name="Axiom.MathLib.dll" localCopy="false"/>
|
||||||
|
<Reference name="Nini.dll" />
|
||||||
|
<Reference name="RAIL.dll"/>
|
||||||
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
|
<Reference name="OpenSim.Region.Terrain.BasicTerrain"/>
|
||||||
|
<Reference name="Nini.dll" />
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<Project name="OpenSim.Region.ScriptEngine.DotNetEngine" path="OpenSim/Region/ScriptEngine/DotNetEngine" type="Library">
|
<Project name="OpenSim.Region.ScriptEngine.DotNetEngine" path="OpenSim/Region/ScriptEngine/DotNetEngine" type="Library">
|
||||||
<Configuration name="Debug">
|
<Configuration name="Debug">
|
||||||
<Options>
|
<Options>
|
||||||
|
@ -1171,22 +1302,57 @@
|
||||||
<Reference name="System.Data" localCopy="false"/>
|
<Reference name="System.Data" localCopy="false"/>
|
||||||
<Reference name="System.Xml" localCopy="false"/>
|
<Reference name="System.Xml" localCopy="false"/>
|
||||||
<Reference name="System.Runtime.Remoting" localCopy="false"/>
|
<Reference name="System.Runtime.Remoting" localCopy="false"/>
|
||||||
<Reference name="OpenSim.Region.Environment" />
|
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
<Reference name="RAIL.dll"/>
|
<Reference name="RAIL.dll"/>
|
||||||
<Reference name="OpenSim.Framework"/>
|
<Reference name="OpenSim.Framework"/>
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
|
<Reference name="OpenSim.Region.Environment" />
|
||||||
<Reference name="OpenSim.Framework.Communications"/>
|
<Reference name="OpenSim.Framework.Communications"/>
|
||||||
<Reference name="OpenSim.Region.ScriptEngine.Common"/>
|
<Reference name="OpenSim.Region.ScriptEngine.Common"/>
|
||||||
<Reference name="OpenSim.Region.Terrain.BasicTerrain"/>
|
<Reference name="OpenSim.Region.Terrain.BasicTerrain"/>
|
||||||
|
<Reference name="Microsoft.JScript"/>
|
||||||
<Reference name="Axiom.MathLib.dll" localCopy="false"/>
|
<Reference name="Axiom.MathLib.dll" localCopy="false"/>
|
||||||
<Reference name="Nini.dll" />
|
<Reference name="Nini.dll" />
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
<Project name="OpenSim.Region.ScriptEngine.LSOEngine" path="OpenSim/Region/ScriptEngine/LSOEngine" type="Library">
|
||||||
|
<Configuration name="Debug">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../../../../bin/ScriptEngines/</OutputPath>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration name="Release">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../../../../bin/ScriptEngines/</OutputPath>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
|
||||||
|
<ReferencePath>../../../../bin/</ReferencePath>
|
||||||
|
<ReferencePath>../../../../bin/ScriptEngines/</ReferencePath>
|
||||||
|
<Reference name="System" localCopy="false"/>
|
||||||
|
<Reference name="System.Data" localCopy="false"/>
|
||||||
|
<Reference name="System.Xml" localCopy="false"/>
|
||||||
|
<Reference name="System.Runtime.Remoting" localCopy="false"/>
|
||||||
|
<Reference name="libsecondlife.dll"/>
|
||||||
|
<Reference name="RAIL.dll"/>
|
||||||
|
<Reference name="OpenSim.Framework"/>
|
||||||
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
|
<Reference name="OpenSim.Region.Environment" />
|
||||||
|
<Reference name="OpenSim.Region.ScriptEngine.Common"/>
|
||||||
|
<Reference name="OpenSim.Region.Terrain.BasicTerrain"/>
|
||||||
|
<Reference name="Axiom.MathLib.dll" localCopy="false"/>
|
||||||
|
<Reference name="Nini.dll" />
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
|
<Files>
|
||||||
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
</Files>
|
||||||
|
</Project>
|
||||||
|
|
||||||
|
|
||||||
<Project name="OpenSim.Grid.ScriptServer" path="OpenSim/Grid/ScriptServer" type="Exe">
|
<Project name="OpenSim.Grid.ScriptServer" path="OpenSim/Grid/ScriptServer" type="Exe">
|
||||||
|
@ -1210,13 +1376,17 @@
|
||||||
<Reference name="OpenSim"/>
|
<Reference name="OpenSim"/>
|
||||||
<Reference name="OpenSim.Framework"/>
|
<Reference name="OpenSim.Framework"/>
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
|
<Reference name="OpenSim.Framework.Communications"/>
|
||||||
<Reference name="OpenSim.Framework.Servers"/>
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
<Reference name="OpenSim.Framework.Data"/>
|
<Reference name="OpenSim.Framework.Data"/>
|
||||||
<Reference name="OpenSim.Region.Environment"/>
|
<Reference name="OpenSim.Region.Environment" />
|
||||||
<Reference name="OpenSim.Region.ScriptEngine.Common"/>
|
<Reference name="OpenSim.Region.ScriptEngine.Common"/>
|
||||||
|
<Reference name="OpenSim.Region.Terrain.BasicTerrain"/>
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
<Reference name="Axiom.MathLib.dll" localCopy="false"/>
|
<Reference name="Axiom.MathLib.dll" localCopy="false"/>
|
||||||
<Reference name="XMLRPC.dll"/>
|
<Reference name="XMLRPC.dll"/>
|
||||||
|
<Reference name="Nini.dll" />
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
@ -1249,6 +1419,7 @@
|
||||||
<Reference name="OpenSim.Region.ScriptEngine.Common"/>
|
<Reference name="OpenSim.Region.ScriptEngine.Common"/>
|
||||||
<Reference name="OpenSim.Region.ScriptEngine.DotNetEngine"/>
|
<Reference name="OpenSim.Region.ScriptEngine.DotNetEngine"/>
|
||||||
<Reference name="Nini.dll" />
|
<Reference name="Nini.dll" />
|
||||||
|
<Reference name="log4net"/>
|
||||||
<!-- Reference name="OpenSim.Grid.ScriptServer"/ -->
|
<!-- Reference name="OpenSim.Grid.ScriptServer"/ -->
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
|
@ -1269,6 +1440,18 @@
|
||||||
</Options>
|
</Options>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
|
|
||||||
|
<!-- Tests -->
|
||||||
|
<Project name="OpenSim.Tests.UserServer.Stress" path="OpenSim/Tests/UserServer/Stress" type="Exe">
|
||||||
|
<Configuration name="Debug">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../../../../bin/tests/stress</OutputPath>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration name="Release">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../../../../bin/tests/stress</OutputPath>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
<ReferencePath>../../../../bin/</ReferencePath>
|
<ReferencePath>../../../../bin/</ReferencePath>
|
||||||
<Reference name="System" localCopy="false"/>
|
<Reference name="System" localCopy="false"/>
|
||||||
<Reference name="OpenSim.Region.Environment" />
|
<Reference name="OpenSim.Region.Environment" />
|
||||||
|
@ -1370,6 +1553,7 @@
|
||||||
<Reference name="OpenSim.Framework"/>
|
<Reference name="OpenSim.Framework"/>
|
||||||
<Reference name="OpenSim.Framework.Data"/>
|
<Reference name="OpenSim.Framework.Data"/>
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
|
<Reference name="OpenSim.Framework.Statistics"/>
|
||||||
<Reference name="OpenSim.Region.Physics.Manager"/>
|
<Reference name="OpenSim.Region.Physics.Manager"/>
|
||||||
<Reference name="OpenSim.Framework.Servers"/>
|
<Reference name="OpenSim.Framework.Servers"/>
|
||||||
<Reference name="OpenSim.Region.Environment"/>
|
<Reference name="OpenSim.Region.Environment"/>
|
||||||
|
@ -1379,16 +1563,39 @@
|
||||||
<Reference name="XMLRPC.dll"/>
|
<Reference name="XMLRPC.dll"/>
|
||||||
<Reference name="OpenSim.Region.Communications.Local"/>
|
<Reference name="OpenSim.Region.Communications.Local"/>
|
||||||
<Reference name="Nini.dll" />
|
<Reference name="Nini.dll" />
|
||||||
|
<Reference name="log4net"/>
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
<Project name="pCampBot" path="OpenSim/Tools/pCampBot" type="Exe">
|
||||||
|
<Configuration name="Debug">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../../../bin/</OutputPath>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration name="Release">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../../../bin/</OutputPath>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
|
||||||
|
<ReferencePath>../../../bin/</ReferencePath>
|
||||||
|
<Reference name="System" localCopy="false"/>
|
||||||
|
<Reference name="libsecondlife.dll"/>
|
||||||
|
<Reference name="OpenSim.Framework"/>
|
||||||
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
|
<Reference name="Nini.dll" />
|
||||||
|
<Reference name="log4net"/>
|
||||||
|
|
||||||
|
<Files>
|
||||||
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
</Files>
|
||||||
|
</Project>
|
||||||
|
|
||||||
</Solution>
|
</Solution>
|
||||||
|
|
||||||
|
|
||||||
<!-- Prebuild tool -->
|
<!-- Prebuild tool -->
|
||||||
<Solution name="Prebuild" path="Prebuild/" >
|
<Solution name="Prebuild" path="Prebuild/" >
|
||||||
<Configuration name="Debug">
|
<Configuration name="Debug">
|
||||||
|
@ -1409,6 +1616,7 @@
|
||||||
<SuppressWarnings>1595</SuppressWarnings>
|
<SuppressWarnings>1595</SuppressWarnings>
|
||||||
</Options>
|
</Options>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
|
|
||||||
<Project name="Prebuild" path="src/" language="C#" assemblyName="Prebuild" icon="App.ico" type="Exe" rootNamespace="Prebuild" startupObject="Prebuild.Prebuild">
|
<Project name="Prebuild" path="src/" language="C#" assemblyName="Prebuild" icon="App.ico" type="Exe" rootNamespace="Prebuild" startupObject="Prebuild.Prebuild">
|
||||||
<Configuration name="Debug">
|
<Configuration name="Debug">
|
||||||
<Options>
|
<Options>
|
||||||
|
@ -1441,16 +1649,5 @@
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Solution>
|
</Solution>
|
||||||
</Prebuild>
|
</Prebuild>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,160 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import os, os.path, popen2, re, string, sys
|
||||||
|
|
||||||
|
def textfile(file):
|
||||||
|
return {
|
||||||
|
"svn:eol-style" : "native"
|
||||||
|
}
|
||||||
|
|
||||||
|
def script(file):
|
||||||
|
return {
|
||||||
|
"svn:eol-style" : "native",
|
||||||
|
"svn:executable" : "*"
|
||||||
|
}
|
||||||
|
|
||||||
|
def executable(file):
|
||||||
|
return {
|
||||||
|
"svn:executable" : "*",
|
||||||
|
"svn:mime-type" : "application/octet-stream"
|
||||||
|
}
|
||||||
|
|
||||||
|
def binary(file):
|
||||||
|
return {
|
||||||
|
"svn:mime-type" : "application/octet-stream"
|
||||||
|
}
|
||||||
|
|
||||||
|
def is_binary(file):
|
||||||
|
f = open(file)
|
||||||
|
data = f.read()
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
for c in data:
|
||||||
|
if c not in string.printable:
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
def binary_or_text(file):
|
||||||
|
if is_binary(file):
|
||||||
|
return binary(file)
|
||||||
|
else:
|
||||||
|
return textfile(file)
|
||||||
|
|
||||||
|
property_map = {
|
||||||
|
".bat" : script,
|
||||||
|
".config" : textfile,
|
||||||
|
".cs" : textfile,
|
||||||
|
".csproj" : textfile,
|
||||||
|
".dat" : binary_or_text,
|
||||||
|
".dll" : binary,
|
||||||
|
".dylib" : binary,
|
||||||
|
".example" : textfile,
|
||||||
|
".exe" : executable,
|
||||||
|
".fxcop" : textfile,
|
||||||
|
".ico" : binary,
|
||||||
|
".include" : textfile,
|
||||||
|
".ini" : textfile,
|
||||||
|
".j2c" : binary,
|
||||||
|
".jp2" : binary,
|
||||||
|
".lsl" : textfile,
|
||||||
|
".mdp" : textfile,
|
||||||
|
".mds" : textfile,
|
||||||
|
".nsi" : textfile,
|
||||||
|
".pdb" : binary,
|
||||||
|
".php" : script,
|
||||||
|
".pidb" : binary,
|
||||||
|
".pl" : script,
|
||||||
|
".png" : binary,
|
||||||
|
".py" : script,
|
||||||
|
".rb" : script,
|
||||||
|
".resx" : textfile,
|
||||||
|
".settings" : textfile,
|
||||||
|
".stetic" : textfile,
|
||||||
|
".sh" : script,
|
||||||
|
".snk" : binary,
|
||||||
|
".so" : binary,
|
||||||
|
".sql" : textfile,
|
||||||
|
".txt" : textfile,
|
||||||
|
".userprefs" : textfile,
|
||||||
|
".usertasks" : textfile,
|
||||||
|
".xml" : textfile,
|
||||||
|
".xsd" : textfile
|
||||||
|
}
|
||||||
|
|
||||||
|
def propset(file, property, value):
|
||||||
|
os.system('svn propset %s "%s" "%s"' % (property, value, file))
|
||||||
|
|
||||||
|
def propdel(file, property):
|
||||||
|
os.system('svn propdel %s "%s"' % (property, file))
|
||||||
|
|
||||||
|
def propget(file, property):
|
||||||
|
output, input, error = popen2.popen3('svn propget %s "%s"' % (property, file))
|
||||||
|
|
||||||
|
err = error.read()
|
||||||
|
if err != "":
|
||||||
|
output.close()
|
||||||
|
error.close()
|
||||||
|
input.close()
|
||||||
|
return ""
|
||||||
|
|
||||||
|
result = output.read()
|
||||||
|
output.close()
|
||||||
|
error.close()
|
||||||
|
input.close()
|
||||||
|
return result.strip()
|
||||||
|
|
||||||
|
def proplist(file):
|
||||||
|
output, input, error = popen2.popen3('svn proplist "%s"' % file)
|
||||||
|
|
||||||
|
err = error.read()
|
||||||
|
if err != "":
|
||||||
|
output.close()
|
||||||
|
error.close()
|
||||||
|
input.close()
|
||||||
|
return None
|
||||||
|
|
||||||
|
result = output.readlines()
|
||||||
|
output.close()
|
||||||
|
error.close()
|
||||||
|
input.close()
|
||||||
|
if len(result) > 0 and re.match("^Properties on .*:$", result[0]) is not None:
|
||||||
|
return [r.strip() for r in result[1:]]
|
||||||
|
else:
|
||||||
|
return ""
|
||||||
|
|
||||||
|
def update_file(file, properties):
|
||||||
|
current_props = proplist(file)
|
||||||
|
|
||||||
|
if current_props is None:
|
||||||
|
# svn error occurred -- probably an unversioned file
|
||||||
|
return
|
||||||
|
|
||||||
|
for p in current_props:
|
||||||
|
if not properties.has_key(p):
|
||||||
|
propdel(file, p)
|
||||||
|
|
||||||
|
for p in properties:
|
||||||
|
if p not in current_props or propget(file, p) != properties[p]:
|
||||||
|
propset(file, p, properties[p])
|
||||||
|
|
||||||
|
def update(dir):
|
||||||
|
for f in os.listdir(dir):
|
||||||
|
fullpath = os.path.join(dir, f)
|
||||||
|
if os.path.isdir(fullpath):
|
||||||
|
if not os.path.islink(fullpath):
|
||||||
|
update(fullpath)
|
||||||
|
else:
|
||||||
|
extension = os.path.splitext(fullpath)[1].lower()
|
||||||
|
if property_map.has_key(extension):
|
||||||
|
update_file(fullpath, property_map[extension](fullpath))
|
||||||
|
elif extension != "" and proplist(fullpath) is not None:
|
||||||
|
print "Warning: No properties defined for %s files (%s)" % (extension, fullpath)
|
||||||
|
|
||||||
|
def main(argv = None):
|
||||||
|
if argv is None:
|
||||||
|
argv = sys.argv
|
||||||
|
|
||||||
|
update(".")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sys.exit(main())
|
Loading…
Reference in New Issue