refactoring

main
Paul Schneider 9 years ago
parent 63044b0efd
commit d590df1c92
40 changed files with 161 additions and 103 deletions

@ -1,10 +0,0 @@
using System;
namespace Yavsc.Interfaces
{
public interface ILifeTime
{
DateTime Modified { get; set; }
DateTime Posted { get; set; }
}
}

@ -2,7 +2,6 @@ using Yavsc.Models.Market;
namespace Yavsc.Models.Billing
{
public class ServiceContract<P> where P : Service
{

@ -8,6 +8,7 @@ namespace Yavsc.Models.Billing
using Newtonsoft.Json;
using Workflow;
using YavscLib;
using YavscLib.Models.Workflow;
public abstract class NominativeServiceCommand : IBaseTrackedEntity, IQuery
{

@ -8,6 +8,10 @@ namespace Yavsc.Models.Haircut
{
public class BrusherProfile : ISpecializationSettings
{
public BrusherProfile()
{
}
[Key]
public string UserId
{

@ -9,7 +9,7 @@ namespace Yavsc.Models.Haircut.Views
public class HaircutQueryProviderInfo : HaircutQueryComonInfo {
public HaircutQueryProviderInfo(HairCutQuery query) : base (query)
{
ClientInfo = new UserInfo(query.Client);
ClientInfo = new UserInfo(query.Client.Id, query.Client.UserName, query.Client.Avatar);
}
public UserInfo ClientInfo { get; set; }
@ -17,7 +17,8 @@ namespace Yavsc.Models.Haircut.Views
public class HaircutQueryClientInfo : HaircutQueryComonInfo {
public HaircutQueryClientInfo(HairCutQuery query) : base (query)
{
ProviderInfo = new UserInfo(query.PerformerProfile.Performer);
var user = query.PerformerProfile.Performer;
ProviderInfo = new UserInfo(user.Id, user.UserName, user.Avatar);
}
public UserInfo ProviderInfo { get; set; }

@ -2,7 +2,6 @@ using System.Collections.Generic;
namespace Yavsc.Models.Market {
public class Catalog {
public List<Product> Products { get; set; }
public List<Service> Services { get; set; }

@ -3,8 +3,8 @@ using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Market {
using System.ComponentModel.DataAnnotations;
using Billing;
using Workflow;
using Yavsc.Models.Billing;
public class Service : BaseProduct
{

@ -23,8 +23,8 @@ using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Messaging
{
using Interfaces;
using Interfaces.Workflow;
using YavscLib;
/// <summary>
/// Base event.

@ -1,6 +1,7 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using YavscLib;
namespace Yavsc.Models.Relationship
{

@ -7,7 +7,7 @@ using Newtonsoft.Json;
namespace Yavsc.Models.Workflow
{
using Market;
using Yavsc.Models.Market;
using YavscLib;
public class Activity : IBaseTrackedEntity, IActivity

@ -6,6 +6,7 @@ using Yavsc.Models.Market;
namespace Yavsc.Models.Workflow
{
using Models.Relationship;
/// <summary>
/// A date, between two persons
/// </summary>

@ -61,7 +61,7 @@
"Google.Apis.Core": "1.11.1",
"Google.Apis": "1.11.1",
"MailKit": "1.12.0",
"MarkdownDeep-av.NET": "1.5.5",
"MarkdownDeep-av.NET": "1.5.6",
"Microsoft.AspNet.Authentication.Cookies": "1.0.0-rc1-final",
"Microsoft.AspNet.Authentication.Facebook": "1.0.0-rc1-final",
"Microsoft.AspNet.Authentication.Twitter": "1.0.0-rc1-final",

@ -289,7 +289,7 @@
"lib/net451/MailKit.dll": {}
}
},
"MarkdownDeep-av.NET/1.5.5": {
"MarkdownDeep-av.NET/1.5.6": {
"type": "package",
"compile": {
"lib/net451/MarkdownDeep.dll": {}
@ -2514,7 +2514,7 @@
"lib/net451/MimeKit.dll": {}
}
},
"Newtonsoft.Json/7.0.1": {
"Newtonsoft.Json/10.0.2": {
"type": "package",
"compile": {
"lib/net45/Newtonsoft.Json.dll": {}
@ -2853,7 +2853,13 @@
},
"YavscLib/1.0.0": {
"type": "project",
"framework": ".NETFramework,Version=v4.5.1"
"framework": ".NETFramework,Version=v4.5.1",
"dependencies": {
"Newtonsoft.Json": "10.0.2"
},
"frameworkAssemblies": [
"System.ComponentModel.DataAnnotations"
]
},
"Zlib.Portable.Signed/1.11.0": {
"type": "package",
@ -3152,7 +3158,7 @@
"lib/net451/MailKit.dll": {}
}
},
"MarkdownDeep-av.NET/1.5.5": {
"MarkdownDeep-av.NET/1.5.6": {
"type": "package",
"compile": {
"lib/net451/MarkdownDeep.dll": {}
@ -5377,7 +5383,7 @@
"lib/net451/MimeKit.dll": {}
}
},
"Newtonsoft.Json/7.0.1": {
"Newtonsoft.Json/10.0.2": {
"type": "package",
"compile": {
"lib/net45/Newtonsoft.Json.dll": {}
@ -5716,7 +5722,13 @@
},
"YavscLib/1.0.0": {
"type": "project",
"framework": ".NETFramework,Version=v4.5.1"
"framework": ".NETFramework,Version=v4.5.1",
"dependencies": {
"Newtonsoft.Json": "10.0.2"
},
"frameworkAssemblies": [
"System.ComponentModel.DataAnnotations"
]
},
"Zlib.Portable.Signed/1.11.0": {
"type": "package",
@ -6015,7 +6027,7 @@
"lib/net451/MailKit.dll": {}
}
},
"MarkdownDeep-av.NET/1.5.5": {
"MarkdownDeep-av.NET/1.5.6": {
"type": "package",
"compile": {
"lib/net451/MarkdownDeep.dll": {}
@ -8240,7 +8252,7 @@
"lib/net451/MimeKit.dll": {}
}
},
"Newtonsoft.Json/7.0.1": {
"Newtonsoft.Json/10.0.2": {
"type": "package",
"compile": {
"lib/net45/Newtonsoft.Json.dll": {}
@ -8579,7 +8591,13 @@
},
"YavscLib/1.0.0": {
"type": "project",
"framework": ".NETFramework,Version=v4.5.1"
"framework": ".NETFramework,Version=v4.5.1",
"dependencies": {
"Newtonsoft.Json": "10.0.2"
},
"frameworkAssemblies": [
"System.ComponentModel.DataAnnotations"
]
},
"Zlib.Portable.Signed/1.11.0": {
"type": "package",
@ -8884,15 +8902,15 @@
"MailKit.nuspec"
]
},
"MarkdownDeep-av.NET/1.5.5": {
"MarkdownDeep-av.NET/1.5.6": {
"type": "package",
"sha512": "RVNumZoZCPDq3H83vrudwptPgR0YFb3MsxIAuGZccUIPiwVUyixGanymHOy0H9QPubkYWo8t00iXqVvIjiu2gg==",
"sha512": "/nK/Hzru+vAmNGX5tZtEkKxCqjUS8a/u1vZaQ4pEmlvm6C9IIJ5rWIJephDWVwbzi6eKdEeduU+xmPfLNXrQwQ==",
"files": [
"lib/dnxcore50/MarkdownDeep.dll",
"lib/MonoAndroid10/MarkdownDeep.dll",
"lib/net451/MarkdownDeep.dll",
"MarkdownDeep-av.NET.1.5.5.nupkg",
"MarkdownDeep-av.NET.1.5.5.nupkg.sha512",
"MarkdownDeep-av.NET.1.5.6.nupkg",
"MarkdownDeep-av.NET.1.5.6.nupkg.sha512",
"MarkdownDeep-av.NET.nuspec"
]
},
@ -10614,9 +10632,9 @@
"MimeKit.nuspec"
]
},
"Newtonsoft.Json/7.0.1": {
"Newtonsoft.Json/10.0.2": {
"type": "package",
"sha512": "q3V4KLetMLnt1gpAVWgtXnHjKs0UG/RalBc29u2ZKxd5t5Ze4JBL5WiiYIklJyK/5CRiIiNwigVQUo0FgbsuWA==",
"sha512": "iwElSU2IXmwGvytJsezyDML2ZWDkG2JzTYzlU/BNlmzMdlmRvbnwITsGGY74gwVEpDli1UdOLkMT7/3jxWvXzA==",
"files": [
"lib/net20/Newtonsoft.Json.dll",
"lib/net20/Newtonsoft.Json.xml",
@ -10626,12 +10644,17 @@
"lib/net40/Newtonsoft.Json.xml",
"lib/net45/Newtonsoft.Json.dll",
"lib/net45/Newtonsoft.Json.xml",
"lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll",
"lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.xml",
"lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll",
"lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.xml",
"Newtonsoft.Json.7.0.1.nupkg",
"Newtonsoft.Json.7.0.1.nupkg.sha512",
"lib/netstandard1.0/Newtonsoft.Json.dll",
"lib/netstandard1.0/Newtonsoft.Json.xml",
"lib/netstandard1.3/Newtonsoft.Json.dll",
"lib/netstandard1.3/Newtonsoft.Json.xml",
"lib/portable-net40+sl5+win8+wpa81+wp8/Newtonsoft.Json.dll",
"lib/portable-net40+sl5+win8+wpa81+wp8/Newtonsoft.Json.xml",
"lib/portable-net45+win8+wpa81+wp8/Newtonsoft.Json.dll",
"lib/portable-net45+win8+wpa81+wp8/Newtonsoft.Json.xml",
"LICENSE.md",
"Newtonsoft.Json.10.0.2.nupkg",
"Newtonsoft.Json.10.0.2.nupkg.sha512",
"Newtonsoft.Json.nuspec",
"tools/install.ps1"
]
@ -11550,7 +11573,7 @@
"Google.Apis.Core >= 1.11.1",
"Google.Apis >= 1.11.1",
"MailKit >= 1.12.0",
"MarkdownDeep-av.NET >= 1.5.5",
"MarkdownDeep-av.NET >= 1.5.6",
"Microsoft.AspNet.Authentication.Cookies >= 1.0.0-rc1-final",
"Microsoft.AspNet.Authentication.Facebook >= 1.0.0-rc1-final",
"Microsoft.AspNet.Authentication.Twitter >= 1.0.0-rc1-final",

@ -1,11 +0,0 @@
namespace YavscLib.HairCut
{
public enum HairLength : int
{
HalfLong,
Short = 1,
Long
}
}

@ -19,7 +19,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
namespace Yavsc.Interfaces
namespace YavscLib
{
/// <summary>
/// I identified.

@ -18,7 +18,7 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
namespace Yavsc.Interfaces
namespace YavscLib
{
public interface ITitle
{

@ -4,7 +4,6 @@ namespace YavscLib.Billing
{
long Id { get; set; }
string Description { get; set; }
int Count { get; set; }
decimal UnitaryCost { get; set; }
long EstimateId { get; set; }

@ -2,6 +2,9 @@
{
public interface IApplicationUser
{
string Id { get; set; }
string UserName { get; set; }
string Avatar { get ; set; }
IAccountBalance AccountBalance { get; set; }
string DedicatedGoogleCalendar { get; set; }
ILocation PostalAddress { get; set; }

@ -7,11 +7,11 @@ namespace Yavsc.Models.Auth
}
public UserInfo(ApplicationUser user)
public UserInfo(string userId, string userName, string avatar)
{
UserId = user.Id;
UserName = user.UserName;
Avatar = user.Avatar;
UserId = userId;
UserName = userName;
Avatar = avatar;
}
public string UserId { get; set; }

@ -1,4 +1,4 @@
namespace Yavsc.Models.Workflow
namespace YavscLib.Models.Workflow
{
using YavscLib;

@ -18,7 +18,8 @@
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
namespace Yavsc.Interfaces
namespace YavscLib.Interfaces
{
/// <summary>

@ -1,4 +1,4 @@
{
{
"version": "1.0.0-*",
"description": "Yavsc Client Api",
"authors": [
@ -12,18 +12,13 @@
"tooling": {
"defaultNamespace": "Yavsc"
},
"dependencies": {},
"dependencies": {
"Newtonsoft.Json": "10.0.2"
},
"frameworks": {
"net451": {
"System.ComponentModel.Annotations": "4.0.0"
},
".NETPortable,Version=v4.5,Profile=Profile111": {
"frameworkAssemblies": {
"System": "4.0.0",
"System.Runtime": "4.0.0",
"System.Globalization": "4.0.0",
"System.Resources.ResourceManager": "4.0.0",
"System.Collections": "4.0.0"
"System.ComponentModel.DataAnnotations": "4.0.0"
}
}
}

@ -2,23 +2,75 @@
"locked": false,
"version": 2,
"targets": {
".NETFramework,Version=v4.5.1": {},
".NETPortable,Version=v4.5,Profile=Profile111": {},
".NETFramework,Version=v4.5.1/debian.8-x86": {},
".NETFramework,Version=v4.5.1/debian.8-x64": {},
".NETPortable,Version=v4.5,Profile=Profile111/debian.8-x86": {},
".NETPortable,Version=v4.5,Profile=Profile111/debian.8-x64": {}
".NETFramework,Version=v4.5.1": {
"Newtonsoft.Json/10.0.2": {
"type": "package",
"compile": {
"lib/net45/Newtonsoft.Json.dll": {}
},
"runtime": {
"lib/net45/Newtonsoft.Json.dll": {}
}
}
},
".NETFramework,Version=v4.5.1/debian.8-x86": {
"Newtonsoft.Json/10.0.2": {
"type": "package",
"compile": {
"lib/net45/Newtonsoft.Json.dll": {}
},
"runtime": {
"lib/net45/Newtonsoft.Json.dll": {}
}
}
},
".NETFramework,Version=v4.5.1/debian.8-x64": {
"Newtonsoft.Json/10.0.2": {
"type": "package",
"compile": {
"lib/net45/Newtonsoft.Json.dll": {}
},
"runtime": {
"lib/net45/Newtonsoft.Json.dll": {}
}
}
}
},
"libraries": {
"Newtonsoft.Json/10.0.2": {
"type": "package",
"sha512": "iwElSU2IXmwGvytJsezyDML2ZWDkG2JzTYzlU/BNlmzMdlmRvbnwITsGGY74gwVEpDli1UdOLkMT7/3jxWvXzA==",
"files": [
"lib/net20/Newtonsoft.Json.dll",
"lib/net20/Newtonsoft.Json.xml",
"lib/net35/Newtonsoft.Json.dll",
"lib/net35/Newtonsoft.Json.xml",
"lib/net40/Newtonsoft.Json.dll",
"lib/net40/Newtonsoft.Json.xml",
"lib/net45/Newtonsoft.Json.dll",
"lib/net45/Newtonsoft.Json.xml",
"lib/netstandard1.0/Newtonsoft.Json.dll",
"lib/netstandard1.0/Newtonsoft.Json.xml",
"lib/netstandard1.3/Newtonsoft.Json.dll",
"lib/netstandard1.3/Newtonsoft.Json.xml",
"lib/portable-net40+sl5+win8+wpa81+wp8/Newtonsoft.Json.dll",
"lib/portable-net40+sl5+win8+wpa81+wp8/Newtonsoft.Json.xml",
"lib/portable-net45+win8+wpa81+wp8/Newtonsoft.Json.dll",
"lib/portable-net45+win8+wpa81+wp8/Newtonsoft.Json.xml",
"LICENSE.md",
"Newtonsoft.Json.10.0.2.nupkg",
"Newtonsoft.Json.10.0.2.nupkg.sha512",
"Newtonsoft.Json.nuspec",
"tools/install.ps1"
]
}
},
"libraries": {},
"projectFileDependencyGroups": {
"": [],
".NETFramework,Version=v4.5.1": [],
".NETPortable,Version=v4.5,Profile=Profile111": [
"fx/System >= 4.0.0",
"fx/System.Runtime >= 4.0.0",
"fx/System.Globalization >= 4.0.0",
"fx/System.Resources.ResourceManager >= 4.0.0",
"fx/System.Collections >= 4.0.0"
"": [
"Newtonsoft.Json >= 10.0.2"
],
".NETFramework,Version=v4.5.1": [
"fx/System.ComponentModel.DataAnnotations >= 4.0.0"
]
}
}
Loading…