From beef71975b8a0c0b56f1ac9cadb4e22fe8045cd8 Mon Sep 17 00:00:00 2001 From: Tal Aloni Date: Thu, 17 May 2018 13:32:37 +0300 Subject: [PATCH] Minor improvements to ServerService and WorkstationService structures ShareInfo: Removed unneccesary lines --- .../ServerService/Structures/ServerInfo/ServerInfo.cs | 8 ++++++-- .../ServerService/Structures/ShareInfo/ShareEnum.cs | 8 ++++++-- .../ServerService/Structures/ShareInfo/ShareInfo.cs | 2 -- .../WorkstationService/Structures/WorkstationInfo.cs | 8 ++++++-- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/SMBLibrary/Services/ServerService/Structures/ServerInfo/ServerInfo.cs b/SMBLibrary/Services/ServerService/Structures/ServerInfo/ServerInfo.cs index cb2473b..501783f 100644 --- a/SMBLibrary/Services/ServerService/Structures/ServerInfo/ServerInfo.cs +++ b/SMBLibrary/Services/ServerService/Structures/ServerInfo/ServerInfo.cs @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 Tal Aloni . All rights reserved. +/* Copyright (C) 2014-2018 Tal Aloni . All rights reserved. * * You can redistribute this program and/or modify it under the terms of * the GNU Lesser Public License as published by the Free Software Foundation, @@ -6,7 +6,6 @@ */ using System; using System.Collections.Generic; -using System.Text; using SMBLibrary.RPC; using Utilities; @@ -24,6 +23,11 @@ namespace SMBLibrary.Services { } + public ServerInfo(uint level) + { + Level = level; + } + public ServerInfo(ServerInfoLevel info) { Level = info.Level; diff --git a/SMBLibrary/Services/ServerService/Structures/ShareInfo/ShareEnum.cs b/SMBLibrary/Services/ServerService/Structures/ShareInfo/ShareEnum.cs index 8be4b8d..5347839 100644 --- a/SMBLibrary/Services/ServerService/Structures/ShareInfo/ShareEnum.cs +++ b/SMBLibrary/Services/ServerService/Structures/ShareInfo/ShareEnum.cs @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 Tal Aloni . All rights reserved. +/* Copyright (C) 2014-2018 Tal Aloni . All rights reserved. * * You can redistribute this program and/or modify it under the terms of * the GNU Lesser Public License as published by the Free Software Foundation, @@ -6,7 +6,6 @@ */ using System; using System.Collections.Generic; -using System.Text; using SMBLibrary.RPC; using Utilities; @@ -24,6 +23,11 @@ namespace SMBLibrary.Services { } + public ShareEnum(uint level) + { + Level = level; + } + public ShareEnum(IShareInfoContainer info) { Level = info.Level; diff --git a/SMBLibrary/Services/ServerService/Structures/ShareInfo/ShareInfo.cs b/SMBLibrary/Services/ServerService/Structures/ShareInfo/ShareInfo.cs index 5fd0269..22eb9d3 100644 --- a/SMBLibrary/Services/ServerService/Structures/ShareInfo/ShareInfo.cs +++ b/SMBLibrary/Services/ServerService/Structures/ShareInfo/ShareInfo.cs @@ -6,7 +6,6 @@ */ using System; using System.Collections.Generic; -using System.Text; using SMBLibrary.RPC; using Utilities; @@ -59,7 +58,6 @@ namespace SMBLibrary.Services default: throw new NotImplementedException(); } - ; parser.EndStructure(); // SHARE_INFO Union } diff --git a/SMBLibrary/Services/WorkstationService/Structures/WorkstationInfo.cs b/SMBLibrary/Services/WorkstationService/Structures/WorkstationInfo.cs index 921cd9a..6cd42cc 100644 --- a/SMBLibrary/Services/WorkstationService/Structures/WorkstationInfo.cs +++ b/SMBLibrary/Services/WorkstationService/Structures/WorkstationInfo.cs @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 Tal Aloni . All rights reserved. +/* Copyright (C) 2014-2018 Tal Aloni . All rights reserved. * * You can redistribute this program and/or modify it under the terms of * the GNU Lesser Public License as published by the Free Software Foundation, @@ -6,7 +6,6 @@ */ using System; using System.Collections.Generic; -using System.Text; using SMBLibrary.RPC; namespace SMBLibrary.Services @@ -23,6 +22,11 @@ namespace SMBLibrary.Services { } + public WorkstationInfo(uint level) + { + Level = level; + } + public WorkstationInfo(WorkstationInfoLevel info) { Level = info.Level;