moves classes into sep files

This commit is contained in:
Shannon
2013-12-18 18:09:54 +11:00
parent fec55e9d1c
commit 4ab32dd270
3 changed files with 49 additions and 42 deletions

View File

@@ -31,46 +31,4 @@ namespace Umbraco.Core.Services
IEnumerable<IMember> GetMembersByPropertyValue(string propertyTypeAlias, bool value);
IEnumerable<IMember> GetMembersByPropertyValue(string propertyTypeAlias, DateTime value);
}
/// <summary>
/// Defines part of the MemberService, which is specific to methods used by the membership provider.
/// </summary>
/// <remarks>
/// Idea is to have this is an isolated interface so that it can be easily 'replaced' in the membership provider impl.
/// </remarks>
internal interface IMembershipMemberService : IService
{
/// <summary>
/// Checks if a member with the username exists
/// </summary>
/// <param name="username"></param>
/// <returns></returns>
bool Exists(string username);
/// <summary>
/// Creates and persists a new member
/// </summary>
/// <param name="username"></param>
/// <param name="email"></param>
/// <param name="password"></param>
/// <param name="memberTypeAlias"></param>
/// <returns></returns>
IMember CreateMember(string username, string email, string password, string memberTypeAlias);
IMember GetById(object id);
IMember GetByEmail(string email);
IMember GetByUsername(string login);
void Delete(IMember membershipUser);
void Save(IMember membershipUser, bool raiseEvents = true);
void Save(IEnumerable<IMember> members, bool raiseEvents = true);
IEnumerable<IMember> FindMembersByEmail(string emailStringToMatch, StringPropertyMatchType matchType = StringPropertyMatchType.StartsWith);
IEnumerable<IMember> FindMembersByUsername(string login, StringPropertyMatchType matchType = StringPropertyMatchType.StartsWith);
}
}

View File

@@ -0,0 +1,48 @@
using System.Collections.Generic;
using Umbraco.Core.Models;
using Umbraco.Core.Persistence.Querying;
namespace Umbraco.Core.Services
{
/// <summary>
/// Defines part of the MemberService, which is specific to methods used by the membership provider.
/// </summary>
/// <remarks>
/// Idea is to have this is an isolated interface so that it can be easily 'replaced' in the membership provider impl.
/// </remarks>
internal interface IMembershipMemberService : IService
{
/// <summary>
/// Checks if a member with the username exists
/// </summary>
/// <param name="username"></param>
/// <returns></returns>
bool Exists(string username);
/// <summary>
/// Creates and persists a new member
/// </summary>
/// <param name="username"></param>
/// <param name="email"></param>
/// <param name="password"></param>
/// <param name="memberTypeAlias"></param>
/// <returns></returns>
IMember CreateMember(string username, string email, string password, string memberTypeAlias);
IMember GetById(object id);
IMember GetByEmail(string email);
IMember GetByUsername(string login);
void Delete(IMember membershipUser);
void Save(IMember membershipUser, bool raiseEvents = true);
void Save(IEnumerable<IMember> members, bool raiseEvents = true);
IEnumerable<IMember> FindMembersByEmail(string emailStringToMatch, StringPropertyMatchType matchType = StringPropertyMatchType.StartsWith);
IEnumerable<IMember> FindMembersByUsername(string login, StringPropertyMatchType matchType = StringPropertyMatchType.StartsWith);
}
}

View File

@@ -764,6 +764,7 @@
<Compile Include="Services\ILocalizationService.cs" />
<Compile Include="Services\IMediaService.cs" />
<Compile Include="Services\IMemberService.cs" />
<Compile Include="Services\IMembershipMemberService.cs" />
<Compile Include="Services\IMembershipUserService.cs" />
<Compile Include="Services\IMemberTypeService.cs" />
<Compile Include="Services\IRelationService.cs" />