using clauses cleanup
This commit is contained in:
parent
1868ed86e5
commit
7f03dd7272
292 changed files with 91 additions and 685 deletions
|
|
@ -1,5 +1,3 @@
|
|||
using System;
|
||||
|
||||
namespace Yavsc.Attributes
|
||||
{
|
||||
public class ActivityBillingAttribute : Attribute
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
using System;
|
||||
|
||||
namespace Yavsc.Attributes
|
||||
{
|
||||
public class ActivitySettingsAttribute : Attribute
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Server.Helpers;
|
||||
|
||||
namespace Yavsc.Attributes.Validation
|
||||
{
|
||||
{
|
||||
/// <summary>
|
||||
/// Valid Remote User Dir Attribute
|
||||
/// </summary>
|
||||
|
|
@ -18,7 +16,7 @@ namespace Yavsc.Attributes.Validation
|
|||
{
|
||||
if (ErrorMessageResourceType==null) {
|
||||
ErrorMessageResourceType = typeof(Yavsc.Attributes.Validation.Resources);
|
||||
ErrorMessageResourceName = "InvalidPath";
|
||||
ErrorMessageResourceName = "InvalidPath";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,12 @@
|
|||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Yavsc.Attributes.Validation
|
||||
{
|
||||
public class YaRegularExpression : System.ComponentModel.DataAnnotations.RegularExpressionAttribute {
|
||||
public class YaRegularExpression : System.ComponentModel.DataAnnotations.RegularExpressionAttribute {
|
||||
public YaRegularExpression(string pattern): base (pattern)
|
||||
{
|
||||
this.ErrorMessage = "RegularExpression: "+ pattern;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string FormatErrorMessage(string name)
|
||||
|
|
@ -20,4 +18,4 @@ namespace Yavsc.Attributes.Validation
|
|||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
using System;
|
||||
|
||||
namespace Yavsc.Attributes.Validation
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, AllowMultiple = false)]
|
||||
|
|
@ -13,13 +11,13 @@ namespace Yavsc.Attributes.Validation
|
|||
public YaRequiredAttribute (string msg) : base(msg)
|
||||
{
|
||||
ErrorMessage = msg;
|
||||
}
|
||||
}
|
||||
public YaRequiredAttribute () : base("Required Field")
|
||||
{
|
||||
ErrorMessageResourceType = typeof(Yavsc.Attributes.Validation.Resources);
|
||||
ErrorMessageResourceName = "FieldRequired";
|
||||
}
|
||||
|
||||
|
||||
public override bool IsValid(object value) {
|
||||
if (value == null) {
|
||||
return false;
|
||||
|
|
@ -34,5 +32,5 @@ namespace Yavsc.Attributes.Validation
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
using System;
|
||||
|
||||
namespace Yavsc.Attributes.Validation
|
||||
{
|
||||
public partial class YaStringLength: YaValidationAttribute
|
||||
|
|
@ -21,15 +19,15 @@ namespace Yavsc.Attributes.Validation
|
|||
{
|
||||
if (ErrorMessageResourceType==null) {
|
||||
ErrorMessageResourceType = typeof(Yavsc.Attributes.Validation.Resources);
|
||||
ErrorMessageResourceName = "InvalidStringLength";
|
||||
ErrorMessageResourceName = "InvalidStringLength";
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsValid(object value) {
|
||||
|
||||
|
||||
string stringValue = value as string;
|
||||
if (stringValue==null) return MinimumLength <= 0;
|
||||
if (MinimumLength>=0)
|
||||
if (MinimumLength>=0)
|
||||
{
|
||||
if (stringValue.Length< MinimumLength) {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Yavsc.Attributes.Validation
|
||||
{
|
||||
public class YaValidationAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute
|
||||
|
|
@ -9,7 +6,7 @@ namespace Yavsc.Attributes.Validation
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public YaValidationAttribute(Func<string> acr): base(acr)
|
||||
{
|
||||
|
||||
|
|
@ -45,4 +42,4 @@ namespace Yavsc.Attributes.Validation
|
|||
return GetResourceString(ErrorMessageResourceName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Attributes.Validation;
|
||||
using Yavsc.Abstract;
|
||||
using Yavsc;
|
||||
|
||||
namespace Yavsc.ViewModels.Account
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Yavsc.Services;
|
||||
|
||||
namespace Yavsc.Billing
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
|
||||
using Yavsc.Abstract.Identity.Security;
|
||||
using Yavsc.Interfaces;
|
||||
|
||||
namespace Yavsc.Blogspot
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.Abstract.Chat
|
||||
|
|
@ -15,4 +14,4 @@ namespace Yavsc.Abstract.Chat
|
|||
|
||||
List<TMod> Moderation { get; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text;
|
||||
using Yavsc.ViewModels.UserFiles;
|
||||
|
||||
namespace Yavsc.Server.Helpers
|
||||
|
|
@ -42,10 +39,10 @@ namespace Yavsc.Server.Helpers
|
|||
{
|
||||
if (name.Any(c => !ValidFileNameChars.Contains(c)))
|
||||
return false;
|
||||
|
||||
|
||||
if (!name.Any(c => !AlfaNum.Contains(c)))
|
||||
return false;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
using System;
|
||||
|
||||
namespace Yavsc.ViewModels
|
||||
namespace Yavsc.ViewModels
|
||||
{
|
||||
public class RemoteFileInfo
|
||||
public class RemoteFileInfo
|
||||
{
|
||||
public string Name { get; set; }
|
||||
|
||||
|
|
@ -11,7 +9,7 @@ namespace Yavsc.ViewModels
|
|||
public DateTime CreationTime { get; set; }
|
||||
|
||||
public DateTime LastModified { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Yavsc.Abstract.FileSystem;
|
||||
using Yavsc.Server.Helpers;
|
||||
|
||||
namespace Yavsc.ViewModels.UserFiles
|
||||
|
|
@ -13,7 +9,7 @@ namespace Yavsc.ViewModels.UserFiles
|
|||
public RemoteFileInfo [] Files {
|
||||
get; set;
|
||||
}
|
||||
public DirectoryShortInfo [] SubDirectories {
|
||||
public DirectoryShortInfo [] SubDirectories {
|
||||
get; set;
|
||||
}
|
||||
private readonly DirectoryInfo dInfo;
|
||||
|
|
@ -23,7 +19,7 @@ namespace Yavsc.ViewModels.UserFiles
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public UserDirectoryInfo(string userReposPath, string userId, string path)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(userId))
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@
|
|||
//
|
||||
// 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/>.
|
||||
using System;
|
||||
|
||||
namespace Yavsc.Models.Google
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,6 @@
|
|||
// 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/>.
|
||||
|
||||
using System;
|
||||
|
||||
namespace Yavsc.Models.Google.Calendar
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -19,14 +19,12 @@
|
|||
// 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/>.
|
||||
|
||||
using System;
|
||||
|
||||
namespace Yavsc.Models.Google.Calendar
|
||||
{
|
||||
/// <summary>
|
||||
/// Calendar list entry.
|
||||
/// </summary>
|
||||
///
|
||||
///
|
||||
[Obsolete("use GoogleUse.Apis")]
|
||||
public class CalendarListEntry {
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
using System;
|
||||
|
||||
namespace Yavsc.Models.Google.Calendar
|
||||
{
|
||||
[Obsolete("use GoogleUse.Apis")]
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@
|
|||
//
|
||||
// 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/>.
|
||||
using System;
|
||||
|
||||
namespace Yavsc.Models.Google
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using Yavsc.Abstract.Models.Messaging;
|
||||
using Yavsc.Models.Messaging;
|
||||
|
||||
namespace Yavsc.Models.Google.Messaging
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Yavsc.Abstract.IT
|
||||
{
|
||||
|
|
@ -13,10 +11,10 @@ namespace Yavsc.Abstract.IT
|
|||
|
||||
}
|
||||
public CharArray (IList<char> word): base(word) {
|
||||
|
||||
|
||||
}
|
||||
public CharArray (IEnumerable<char> word): base(word) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
public IList<char> Aggregate(char other)
|
||||
|
|
@ -89,10 +87,10 @@ namespace Yavsc.Abstract.IT
|
|||
State = -3;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
State = states[letter];
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Yavsc.Abstract.IT
|
||||
{
|
||||
// un code est, parmis les ensembles de suites de signes,
|
||||
|
|
@ -14,7 +12,7 @@ namespace Yavsc.Abstract.IT
|
|||
bool Validate();
|
||||
|
||||
/// <summary>
|
||||
/// Defines a new letter in this code,
|
||||
/// Defines a new letter in this code,
|
||||
/// as an enumerable of <c>TLetter</c>
|
||||
/// </summary>
|
||||
/// <param name="letter"></param>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Yavsc.Abstract.IT
|
||||
{
|
||||
public interface IProject
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
using System;
|
||||
|
||||
namespace Yavsc.Abstract.Identity
|
||||
{
|
||||
public class TokenInfo
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
using System;
|
||||
|
||||
namespace Yavsc
|
||||
{
|
||||
public interface ITrackedEntity
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
using System;
|
||||
|
||||
namespace Yavsc.Abstract.Interfaces
|
||||
{
|
||||
public interface IBatch<TInput, TOutput>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
namespace Yavsc.Services
|
||||
{
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using Yavsc.Abstract.Workflow;
|
||||
|
||||
public interface IBillingService
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using Yavsc.Abstract.Identity;
|
||||
using Yavsc.Abstract.Identity;
|
||||
|
||||
namespace Yavsc.Interfaces
|
||||
{
|
||||
|
|
@ -11,4 +10,4 @@ namespace Yavsc.Interfaces
|
|||
ILocation Location { get; set; }
|
||||
decimal? Previsionnal { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Interfaces;
|
||||
using Yavsc.Interfaces;
|
||||
|
||||
namespace Yavsc.Models.Messaging
|
||||
{
|
||||
|
|
@ -8,5 +6,5 @@ namespace Yavsc.Models.Messaging
|
|||
Reason For { get; set; }
|
||||
string Message { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
|
|
@ -29,7 +28,7 @@ namespace Yavsc.Abstract.Models.Messaging
|
|||
/// </summary>
|
||||
[StringLength(512)]
|
||||
[Display(Name = "Icône")]
|
||||
public string? icon { get; set; }
|
||||
public string? icon { get; set; }
|
||||
/// <summary>
|
||||
/// The sound.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System;
|
||||
using Yavsc.Abstract.Identity;
|
||||
using Yavsc.Models.Relationship;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.Models.Relationship
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Attributes.Validation;
|
||||
|
||||
namespace Yavsc.Models.Relationship
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yavsc.Abstract.Templates
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
using System;
|
||||
|
||||
namespace Yavsc
|
||||
{
|
||||
public interface IActivity
|
||||
|
|
|
|||
|
|
@ -16,8 +16,6 @@
|
|||
// along with yavsc. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
using System;
|
||||
|
||||
namespace Yavsc
|
||||
{
|
||||
public interface IMobileDeviceDeclaration
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
using System;
|
||||
|
||||
namespace Yavsc.Abstract.Workflow
|
||||
{
|
||||
public interface IDecidableQuery: ITrackedEntity, IQuery
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Yavsc.Models.Process
|
||||
{
|
||||
public class Conjonction : List<IRequisition>, IRequisition
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Yavsc.Models.Process
|
||||
{
|
||||
public class Disjonction : List<IRequisition>, IRequisition
|
||||
|
|
|
|||
|
|
@ -1,7 +1,3 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace Yavsc.Abstract.Workflow
|
||||
{
|
||||
public interface IExecutionData
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
using System.Collections.Generic;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Abstract.Workflow
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Yavsc.Abstract.Workflow
|
||||
{
|
||||
public class TaskManager : ITaskRunnerProvider
|
||||
|
|
@ -17,4 +14,4 @@ namespace Yavsc.Abstract.Workflow
|
|||
return runners.Where(r => r.GetType().Name.IndexOf(runnerName.Trim())>=0).ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue