Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[TorrentEditor] Reorder the properties a little and update build files.

  • Loading branch information...
commit 4caf6ad65c342aa4c34133ab6720fc682e912c28 1 parent e4ea42c
@alanmcgovern alanmcgovern authored
View
51 src/MonoTorrent/MonoTorrent.Common/TorrentEditor.cs
@@ -1,24 +1,39 @@
-using System;
+//
+// TorrentEditor.cs
+//
+// Authors:
+// Alan McGovern alan.mcgovern@gmail.com
+//
+// Copyright (C) 2010 Alan McGovern
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace MonoTorrent {
-using MonoTorrent.BEncoding;
-using MonoTorrent.Common;
-
-namespace MonoTorrent
-{
public class TorrentEditor {
public bool CanEditSecureMetadata {
get; set;
}
- BEncodedDictionary InfoDict {
- get { return (BEncodedDictionary) Metadata ["info"]; }
- }
-
- BEncodedDictionary Metadata {
- get; set;
- }
-
public string Comment {
get { return GetString (Metadata, "comment"); }
set { SetString (Metadata, "comment", value); }
@@ -34,6 +49,14 @@ public class TorrentEditor {
private set { SetString (Metadata, "encoding", value); }
}
+ BEncodedDictionary InfoDict {
+ get { return (BEncodedDictionary) Metadata ["info"]; }
+ }
+
+ BEncodedDictionary Metadata {
+ get; set;
+ }
+
public long PieceLength {
get { return GetLong (InfoDict, "piece length"); }
set { SetLong (InfoDict, "piece length", value); }
View
1  src/MonoTorrent/MonoTorrent.csproj
@@ -327,6 +327,7 @@
<Compile Include="MonoTorrent.Client\NetworkIO\ReceiveMessageState.cs" />
<Compile Include="MonoTorrent.Common\MagnetLink.cs" />
<Compile Include="MonoTorrent.Common\UriHelper.cs" />
+ <Compile Include="MonoTorrent.Common\TorrentEditor.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
Please sign in to comment.
Something went wrong with that request. Please try again.