REORG
This commit is contained in:
parent
8d68ee380a
commit
45514010f2
3505 changed files with 154 additions and 523 deletions
|
|
@ -1,35 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace Yavsc
|
||||
{
|
||||
public interface IActivity
|
||||
{
|
||||
string Code { get; set; }
|
||||
string Name { get; set; }
|
||||
string ParentCode { get; set; }
|
||||
string Photo { get; set; }
|
||||
string Description { get; set; }
|
||||
string ModeratorGroupName { get; set; }
|
||||
int Rate { get; set; }
|
||||
string SettingsClassName { get; set; }
|
||||
DateTime DateCreated
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
string UserCreated
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
DateTime DateModified
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
string UserModified
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
namespace Yavsc.Models
|
||||
{
|
||||
public interface IBlackListed
|
||||
{
|
||||
long Id { get; set; }
|
||||
string UserId { get; set; }
|
||||
string OwnerId { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
namespace Yavsc.Interfaces
|
||||
{
|
||||
public interface ICircle
|
||||
{
|
||||
long Id { get; set; }
|
||||
string Name { get; set; }
|
||||
string OwnerId { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
namespace Yavsc
|
||||
{
|
||||
public interface ICoWorking
|
||||
{
|
||||
long Id {get; set; }
|
||||
string PerformerId { get; set; }
|
||||
string WorkingForId { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
namespace Yavsc
|
||||
{
|
||||
public interface ICommandForm
|
||||
{
|
||||
long Id { get; set; }
|
||||
string ActionName { get; set; }
|
||||
string Title { get; set; }
|
||||
string ActivityCode { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
namespace Yavsc
|
||||
{
|
||||
public interface IContact
|
||||
{
|
||||
string OwnerId { get; set; }
|
||||
string UserId { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
|
||||
namespace Yavsc.Interfaces.Workflow {
|
||||
public interface IEvent {
|
||||
/// <summary>
|
||||
/// <c>/topic/(bookquery|estimate)</c>
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
string Topic { get; }
|
||||
/// <summary>
|
||||
/// Should be the user's name
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
string Sender { get; set ; }
|
||||
|
||||
string CreateBody();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
namespace Yavsc
|
||||
{
|
||||
public interface ILocation : IPosition
|
||||
{
|
||||
string Address { get; set; }
|
||||
long Id { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
// Copyright (C) 2016 Paul Schneider
|
||||
//
|
||||
// This file is part of yavsc.
|
||||
//
|
||||
// yavsc is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// yavsc is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with yavsc. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Yavsc
|
||||
{
|
||||
public interface IMobileDeviceDeclaration
|
||||
{
|
||||
string DeviceId { get; set; }
|
||||
string Model { get; set; }
|
||||
string Platform { get; set; }
|
||||
string Version { get; set; }
|
||||
DateTime? LatestActivityUpdate { get; set; }
|
||||
string DeviceOwnerId { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace Yavsc.Abstract.Workflow
|
||||
{
|
||||
public interface IDecidableQuery: ITrackedEntity, IQuery
|
||||
{
|
||||
bool Decided { get; set; }
|
||||
bool Accepted { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
namespace Yavsc.Workflow
|
||||
{
|
||||
public interface IPerformerProfile
|
||||
{
|
||||
string PerformerId { get; set; }
|
||||
string SIREN { get; set; }
|
||||
bool AcceptNotifications { get; set; }
|
||||
long OrganizationAddressId { get; set; }
|
||||
bool AcceptPublicContact { get; set; }
|
||||
bool UseGeoLocalizationToReduceDistanceWithClients { get; set; }
|
||||
string WebSite { get; set; }
|
||||
bool Active { get; set; }
|
||||
int? MaxDailyCost { get; set; }
|
||||
int? MinDailyCost { get; set; }
|
||||
int Rate { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
namespace Yavsc
|
||||
{
|
||||
public interface IPosition
|
||||
{
|
||||
double Latitude { get; set; }
|
||||
double Longitude { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
namespace Yavsc.Abstract.Workflow
|
||||
{
|
||||
using Yavsc;
|
||||
using Yavsc.Billing;
|
||||
|
||||
public interface IQuery: ITrackedEntity, IBillable
|
||||
{
|
||||
QueryStatus Status { get; set; }
|
||||
string PaymentId { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
namespace Yavsc
|
||||
{
|
||||
public interface IUserSettings
|
||||
{
|
||||
string UserId { get ; set ; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Yavsc.Models.Process
|
||||
{
|
||||
public class Conjonction : List<IRequisition>, IRequisition
|
||||
{
|
||||
public bool Eval()
|
||||
{
|
||||
foreach (var req in this)
|
||||
if (!req.Eval())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Yavsc.Models.Process
|
||||
{
|
||||
public class Disjonction : List<IRequisition>, IRequisition
|
||||
{
|
||||
public bool Eval()
|
||||
{
|
||||
foreach (var req in this)
|
||||
if (req.Eval())
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
|
||||
namespace Yavsc.Models.Process
|
||||
{
|
||||
public class ConstInputValue : NamedRequisition
|
||||
{
|
||||
public bool Value { get; set; }
|
||||
public override bool Eval()
|
||||
{
|
||||
return Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
using Yavsc.Interfaces;
|
||||
|
||||
namespace Yavsc.Models.Process
|
||||
{
|
||||
public abstract class NamedRequisition : IRequisition, INamedObject
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public abstract bool Eval();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
|
||||
namespace Yavsc.Models.Process
|
||||
{
|
||||
public class Negation<Exp> : IRequisition where Exp : IRequisition
|
||||
{
|
||||
readonly Exp _expression;
|
||||
public Negation(Exp expression)
|
||||
{
|
||||
_expression = expression;
|
||||
}
|
||||
public bool Eval()
|
||||
{
|
||||
return !_expression.Eval();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.Models.Process
|
||||
{
|
||||
/// <summary>
|
||||
/// An abstract, identified rule
|
||||
/// </summary>
|
||||
public abstract class Rule<TResult,TInput>
|
||||
{
|
||||
[Key]
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Left part for this class of rule, a conjonction.
|
||||
/// All of these requisitions must be true
|
||||
/// in order to begin any related process.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Conjonction Left { get; set; }
|
||||
/// <summary>
|
||||
/// Right part of this rule, a disjonction.
|
||||
/// That is, only one of these post requisitions
|
||||
/// has to be true in order for this rule
|
||||
/// to expose a success.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Disjonction Right { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
public abstract TResult Execute(TInput inputData);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
namespace Yavsc
|
||||
{
|
||||
/// <summary>
|
||||
/// Status,
|
||||
/// should be associated to any
|
||||
/// client user query to a provider user or
|
||||
/// other external entity.
|
||||
/// </summary>
|
||||
public enum QueryStatus: int
|
||||
{
|
||||
Inserted,
|
||||
OwnerValidated,
|
||||
Visited,
|
||||
Rejected,
|
||||
Accepted,
|
||||
InProgress,
|
||||
|
||||
// final states
|
||||
Failed,
|
||||
Success
|
||||
}
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace Yavsc.Abstract.Workflow
|
||||
{
|
||||
public interface IExecutionData
|
||||
{
|
||||
Task Payload { get; }
|
||||
|
||||
ITaskMetaData MetaData { get; }
|
||||
|
||||
string [] Args { get; }
|
||||
IList<IMayBeFixable> Faults { get; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
namespace Yavsc.Abstract.Workflow
|
||||
{
|
||||
public interface IMayBeFixable
|
||||
{
|
||||
bool Fixable { get; }
|
||||
|
||||
void TryAndFix();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
namespace Yavsc.Models
|
||||
{
|
||||
public interface IRequisition
|
||||
{
|
||||
bool Eval();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Abstract.Workflow
|
||||
{
|
||||
public interface ITaskMetaData
|
||||
{
|
||||
string TaskName { get; }
|
||||
IEnumerable <IRequisition> Prerequisites { get; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
namespace Yavsc.Abstract.Workflow
|
||||
{
|
||||
public interface ITaskRunner
|
||||
{
|
||||
IExecutionData Run( ITaskMetaData taskMetaData, string [] args);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
namespace Yavsc.Abstract.Workflow
|
||||
{
|
||||
public interface ITaskRunnerProvider
|
||||
{
|
||||
ITaskRunner[] FindRunner(string runnerName);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Yavsc.Abstract.Workflow
|
||||
{
|
||||
public class TaskManager : ITaskRunnerProvider
|
||||
{
|
||||
List<ITaskRunner> runners = new List<ITaskRunner>();
|
||||
public void Register(ITaskRunner runner)
|
||||
{
|
||||
runners.Add(runner);
|
||||
}
|
||||
public ITaskRunner[] FindRunner(string runnerName)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(runnerName))
|
||||
return runners.ToArray();
|
||||
return runners.Where(r => r.GetType().Name.IndexOf(runnerName.Trim())>=0).ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue