synchronize Server/Scripts project properties

whitespace/comment changes in Serialization.cs and ScriptCompiler.cs
proper dispose pattern for Listener
remove IDisposable from FileLogger
This commit is contained in:
Mark Sturgill 2014-02-25 14:00:32 -07:00
parent abe9f5acb2
commit 83bf81b7ee
6 changed files with 21 additions and 12 deletions

View file

@ -30,9 +30,9 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTitle("RunUO Server Core")] //Having just RunUO there is reundant, ie, RunUO.exe with the word 'RunUO' under it
[assembly: AssemblyDescription("UO Server Software")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("The RunUO Team")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyCompany("RunUO")]
[assembly: AssemblyProduct("RunUO")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

View file

@ -735,7 +735,7 @@ namespace Server
}
}
public class FileLogger : TextWriter, IDisposable
public class FileLogger : TextWriter
{
private string m_FileName;
private bool m_NewLine;

View file

@ -267,12 +267,22 @@ namespace Server.Network
return array;
}
public void Dispose() {
Socket socket = Interlocked.Exchange<Socket>( ref m_Listener, null );
public void Dispose(bool disposing)
{
if (disposing)
{
Socket socket = Interlocked.Exchange<Socket>(ref m_Listener, null);
if ( socket != null ) {
socket.Close();
if (socket != null)
{
socket.Close();
}
}
}
public void Dispose() {
Dispose(true);
GC.SuppressFinalize(this);
}
}
}

View file

@ -89,12 +89,11 @@ namespace Server
AppendCompilerOption( ref sb, "/d:MONO" );
#endif
//These three defines are legacy, ie, depreciated.
//These three defines are deprecated
if( Core.Is64Bit )
AppendCompilerOption( ref sb, "/d:x64" );
AppendCompilerOption( ref sb, "/d:Framework_2_0" );
AppendCompilerOption( ref sb, "/d:Framework_4_0" );
return (sb == null ? null : sb.ToString());

View file

@ -1394,7 +1394,6 @@ namespace Server
private static int m_ThreadCount = 0;
public static int ThreadCount { get { return m_ThreadCount; } }
private int BufferSize;
private long m_LastPos, m_CurPos;

View file

@ -8,7 +8,8 @@
<NoStandardLibraries>false</NoStandardLibraries>
<AssemblyName>RunUO</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>