GIT: perform LF normalization

This commit is contained in:
Gary Sharp
2013-02-28 17:15:46 +11:00
parent 989f08a24d
commit 7d9be5620d
729 changed files with 300734 additions and 300712 deletions
+74 -74
View File
@@ -1,74 +1,74 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
namespace Disco.Models.BI.Config
{
public class OrganisationAddress
{
public int? Id { get; set; }
[Required]
public string Name { get; set; }
[Required]
public string Address { get; set; }
[Required]
public string Suburb { get; set; }
[Required]
public string Postcode { get; set; }
[Required]
public string State { get; set; }
[Required]
public string Country { get; set; }
[Required]
public string ShortName { get; set; }
// Added 2012-12-11 G#
// http://discoict.com.au/forum/support/2012/12/address-details.aspx
public string PhoneNumber { get; set; }
public string FaxNumber { get; set; }
// End Added 2012-12-11 G#
public string ToConfigurationEntry()
{
StringBuilder entryBuilder = new StringBuilder();
entryBuilder.AppendLine(Name.Trim());
entryBuilder.AppendLine(Address.Trim());
entryBuilder.AppendLine(Suburb.Trim());
entryBuilder.AppendLine(Postcode.Trim());
entryBuilder.AppendLine(State.Trim());
entryBuilder.AppendLine(Country.Trim());
if (!string.IsNullOrEmpty(ShortName))
{
entryBuilder.AppendLine(ShortName.Trim());
}
return entryBuilder.ToString();
}
public static OrganisationAddress FromConfigurationEntry(int Id, string Entry)
{
string[] entryLines = Entry.Split(new string[] { Environment.NewLine }, StringSplitOptions.None);
if (entryLines.Length >= 6)
{
return new OrganisationAddress()
{
Id = Id,
Name = entryLines[0].Trim(),
Address = entryLines[1].Trim(),
Suburb = entryLines[2].Trim(),
Postcode = entryLines[3].Trim(),
State = entryLines[4].Trim(),
Country = entryLines[5].Trim(),
ShortName = (entryLines.Length > 6 ? entryLines[6].Trim() : string.Empty)
};
}
throw new ArgumentException("Invalid Configuration Address Entry", "entry");
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
namespace Disco.Models.BI.Config
{
public class OrganisationAddress
{
public int? Id { get; set; }
[Required]
public string Name { get; set; }
[Required]
public string Address { get; set; }
[Required]
public string Suburb { get; set; }
[Required]
public string Postcode { get; set; }
[Required]
public string State { get; set; }
[Required]
public string Country { get; set; }
[Required]
public string ShortName { get; set; }
// Added 2012-12-11 G#
// http://discoict.com.au/forum/support/2012/12/address-details.aspx
public string PhoneNumber { get; set; }
public string FaxNumber { get; set; }
// End Added 2012-12-11 G#
public string ToConfigurationEntry()
{
StringBuilder entryBuilder = new StringBuilder();
entryBuilder.AppendLine(Name.Trim());
entryBuilder.AppendLine(Address.Trim());
entryBuilder.AppendLine(Suburb.Trim());
entryBuilder.AppendLine(Postcode.Trim());
entryBuilder.AppendLine(State.Trim());
entryBuilder.AppendLine(Country.Trim());
if (!string.IsNullOrEmpty(ShortName))
{
entryBuilder.AppendLine(ShortName.Trim());
}
return entryBuilder.ToString();
}
public static OrganisationAddress FromConfigurationEntry(int Id, string Entry)
{
string[] entryLines = Entry.Split(new string[] { Environment.NewLine }, StringSplitOptions.None);
if (entryLines.Length >= 6)
{
return new OrganisationAddress()
{
Id = Id,
Name = entryLines[0].Trim(),
Address = entryLines[1].Trim(),
Suburb = entryLines[2].Trim(),
Postcode = entryLines[3].Trim(),
State = entryLines[4].Trim(),
Country = entryLines[5].Trim(),
ShortName = (entryLines.Length > 6 ? entryLines[6].Trim() : string.Empty)
};
}
throw new ArgumentException("Invalid Configuration Address Entry", "entry");
}
}
}
@@ -1,59 +1,59 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
namespace Disco.Models.BI.DocumentTemplates
{
public class DocumentState : IDisposable
{
public int SequenceNumber { get; set; }
public Hashtable FieldCache { get; set; }
public Hashtable ScopeCache { get; set; }
public Hashtable DocumentCache { get; set; }
public DocumentState(int SequenceNumber)
{
this.SequenceNumber = SequenceNumber;
this.FieldCache = new Hashtable();
this.ScopeCache = new Hashtable();
this.DocumentCache = new Hashtable();
}
public void FlushFieldCache()
{
FlushDictionary(this.FieldCache);
}
public void FlushScopeCache()
{
FlushFieldCache();
FlushDictionary(this.ScopeCache);
}
public void FlushDocumentCache()
{
FlushScopeCache();
FlushDictionary(this.DocumentCache);
}
private static void FlushDictionary(Hashtable d)
{
foreach (var key in d.Keys)
{
var disposeItem = d[key] as IDisposable;
if (disposeItem != null)
disposeItem.Dispose();
}
d.Clear();
}
public static DocumentState DefaultState()
{
return new DocumentState(1);
}
public void Dispose()
{
FlushDocumentCache();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
namespace Disco.Models.BI.DocumentTemplates
{
public class DocumentState : IDisposable
{
public int SequenceNumber { get; set; }
public Hashtable FieldCache { get; set; }
public Hashtable ScopeCache { get; set; }
public Hashtable DocumentCache { get; set; }
public DocumentState(int SequenceNumber)
{
this.SequenceNumber = SequenceNumber;
this.FieldCache = new Hashtable();
this.ScopeCache = new Hashtable();
this.DocumentCache = new Hashtable();
}
public void FlushFieldCache()
{
FlushDictionary(this.FieldCache);
}
public void FlushScopeCache()
{
FlushFieldCache();
FlushDictionary(this.ScopeCache);
}
public void FlushDocumentCache()
{
FlushScopeCache();
FlushDictionary(this.DocumentCache);
}
private static void FlushDictionary(Hashtable d)
{
foreach (var key in d.Keys)
{
var disposeItem = d[key] as IDisposable;
if (disposeItem != null)
disposeItem.Dispose();
}
d.Clear();
}
public static DocumentState DefaultState()
{
return new DocumentState(1);
}
public void Dispose()
{
FlushDocumentCache();
}
}
}
@@ -1,18 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace Disco.Models.BI.Expressions
{
public interface IImageExpressionResult
{
Stream GetImage(int Width, int Height);
byte Quality { get; set; }
bool LosslessFormat { get; set; }
bool ShowField { get; set; }
string BackgroundColour { get; set; }
bool BackgroundPreferTransparent { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace Disco.Models.BI.Expressions
{
public interface IImageExpressionResult
{
Stream GetImage(int Width, int Height);
byte Quality { get; set; }
bool LosslessFormat { get; set; }
bool ShowField { get; set; }
string BackgroundColour { get; set; }
bool BackgroundPreferTransparent { get; set; }
}
}
@@ -1,16 +1,16 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace Disco.Models.BI.Interop.Community
{
public class UpdateRequestBase
{
public virtual int RequestVersion { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace Disco.Models.BI.Interop.Community
{
public class UpdateRequestBase
{
public virtual int RequestVersion { get; set; }
}
}
@@ -1,24 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Disco.Models.BI.Interop.Community
{
public class UpdateResponse
{
public string Version { get; set; }
public DateTime VersionReleasedTimestamp { get; set; }
public string Blurb { get; set; }
public string UrlLink { get; set; }
public DateTime ResponseTimestamp { get; set; }
public bool BetaRelease { get; set; }
public bool IsUpdatable(Version TestVersion)
{
var updateVersion = System.Version.Parse(this.Version);
return (updateVersion > TestVersion);
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Disco.Models.BI.Interop.Community
{
public class UpdateResponse
{
public string Version { get; set; }
public DateTime VersionReleasedTimestamp { get; set; }
public string Blurb { get; set; }
public string UrlLink { get; set; }
public DateTime ResponseTimestamp { get; set; }
public bool BetaRelease { get; set; }
public bool IsUpdatable(Version TestVersion)
{
var updateVersion = System.Version.Parse(this.Version);
return (updateVersion > TestVersion);
}
}
}
+74 -74
View File
@@ -1,74 +1,74 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.BI.Job
{
public class JobTableModel
{
public bool ShowId { get; set; }
public bool? ShowDeviceAddress { get; set; }
public bool ShowDates { get; set; }
public bool ShowType { get; set; }
public bool ShowDevice { get; set; }
public bool ShowUser { get; set; }
public bool ShowTechnician { get; set; }
public bool ShowLocation { get; set; }
public bool ShowStatus { get; set; }
public bool IsSmallTable { get; set; }
public bool HideClosedJobs { get; set; }
public List<JobTableItemModel> Items { get; set; }
public JobTableModel()
{
ShowId = true;
ShowDates = true;
ShowType = true;
ShowDevice = true;
ShowUser = true;
ShowTechnician = true;
}
public class JobTableItemModel
{
public int Id { get; set; }
public int? DeviceAddressId { get; set; }
public string DeviceAddress { get; set; }
public DateTime OpenedDate { get; set; }
public DateTime? ClosedDate { get; set; }
public string TypeId { get; set; }
public string TypeDescription { get; set; }
public string DeviceSerialNumber { get; set; }
public string DeviceModelDescription { get; set; }
public string UserId { get; set; }
public string UserDisplayName { get; set; }
public string OpenedTechUserId { get; set; }
public string OpenedTechUserDisplayName { get; set; }
public string StatusDescription { get; set; }
public string StatusId { get; set; }
public string Location { get; set; }
}
public class JobTableItemModelIncludeStatus : JobTableItemModel
{
public string JobMetaWarranty_ExternalReference { get; set; }
public DateTime? JobMetaWarranty_ExternalCompletedDate { get; set; }
public DateTime? JobMetaNonWarranty_RepairerLoggedDate { get; set; }
public DateTime? JobMetaNonWarranty_RepairerCompletedDate { get; set; }
public DateTime? JobMetaNonWarranty_AccountingChargeAddedDate { get; set; }
public DateTime? JobMetaNonWarranty_AccountingChargePaidDate { get; set; }
public DateTime? JobMetaNonWarranty_AccountingChargeRequiredDate { get; set; }
public bool? JobMetaNonWarranty_IsInsuranceClaim { get; set; }
public DateTime? JobMetaInsurance_ClaimFormSentDate { get; set; }
public DateTime? WaitingForUserAction { get; set; }
public DateTime? DeviceReadyForReturn { get; set; }
public DateTime? DeviceHeld { get; set; }
public DateTime? DeviceReturnedDate { get; set; }
public string JobMetaWarranty_ExternalName { get; set; }
public string JobMetaNonWarranty_RepairerName { get; set; }
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.BI.Job
{
public class JobTableModel
{
public bool ShowId { get; set; }
public bool? ShowDeviceAddress { get; set; }
public bool ShowDates { get; set; }
public bool ShowType { get; set; }
public bool ShowDevice { get; set; }
public bool ShowUser { get; set; }
public bool ShowTechnician { get; set; }
public bool ShowLocation { get; set; }
public bool ShowStatus { get; set; }
public bool IsSmallTable { get; set; }
public bool HideClosedJobs { get; set; }
public List<JobTableItemModel> Items { get; set; }
public JobTableModel()
{
ShowId = true;
ShowDates = true;
ShowType = true;
ShowDevice = true;
ShowUser = true;
ShowTechnician = true;
}
public class JobTableItemModel
{
public int Id { get; set; }
public int? DeviceAddressId { get; set; }
public string DeviceAddress { get; set; }
public DateTime OpenedDate { get; set; }
public DateTime? ClosedDate { get; set; }
public string TypeId { get; set; }
public string TypeDescription { get; set; }
public string DeviceSerialNumber { get; set; }
public string DeviceModelDescription { get; set; }
public string UserId { get; set; }
public string UserDisplayName { get; set; }
public string OpenedTechUserId { get; set; }
public string OpenedTechUserDisplayName { get; set; }
public string StatusDescription { get; set; }
public string StatusId { get; set; }
public string Location { get; set; }
}
public class JobTableItemModelIncludeStatus : JobTableItemModel
{
public string JobMetaWarranty_ExternalReference { get; set; }
public DateTime? JobMetaWarranty_ExternalCompletedDate { get; set; }
public DateTime? JobMetaNonWarranty_RepairerLoggedDate { get; set; }
public DateTime? JobMetaNonWarranty_RepairerCompletedDate { get; set; }
public DateTime? JobMetaNonWarranty_AccountingChargeAddedDate { get; set; }
public DateTime? JobMetaNonWarranty_AccountingChargePaidDate { get; set; }
public DateTime? JobMetaNonWarranty_AccountingChargeRequiredDate { get; set; }
public bool? JobMetaNonWarranty_IsInsuranceClaim { get; set; }
public DateTime? JobMetaInsurance_ClaimFormSentDate { get; set; }
public DateTime? WaitingForUserAction { get; set; }
public DateTime? DeviceReadyForReturn { get; set; }
public DateTime? DeviceHeld { get; set; }
public DateTime? DeviceReturnedDate { get; set; }
public string JobMetaWarranty_ExternalName { get; set; }
public string JobMetaNonWarranty_RepairerName { get; set; }
}
}
}
@@ -1,15 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.BI.Job.Statistics
{
public class DailyOpenedClosedItem
{
public DateTime Timestamp { get; set; }
public int TotalJobs { get; set; }
public int OpenedJobs { get; set; }
public int ClosedJobs { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.BI.Job.Statistics
{
public class DailyOpenedClosedItem
{
public DateTime Timestamp { get; set; }
public int TotalJobs { get; set; }
public int OpenedJobs { get; set; }
public int ClosedJobs { get; set; }
}
}
@@ -1,34 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.BI.Search
{
public class DeviceSearchResultItem
{
public string AssetNumber { get; set; }
public string AssignedUserDescription
{
get
{
if (AssignedUserId != null)
{
if (AssignedUserDisplayName != null)
return string.Format("{0} ({1})", AssignedUserDisplayName, AssignedUserId);
else
return AssignedUserId;
}
return string.Empty;
}
}
public string AssignedUserDisplayName { get; set; }
public string AssignedUserId { get; set; }
public string ComputerName { get; set; }
public string DeviceModelDescription { get; set; }
public string DeviceProfileDescription { get; set; }
public int JobCount { get; set; }
public DateTime? DecommissionedDate { get; set; }
public string SerialNumber { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.BI.Search
{
public class DeviceSearchResultItem
{
public string AssetNumber { get; set; }
public string AssignedUserDescription
{
get
{
if (AssignedUserId != null)
{
if (AssignedUserDisplayName != null)
return string.Format("{0} ({1})", AssignedUserDisplayName, AssignedUserId);
else
return AssignedUserId;
}
return string.Empty;
}
}
public string AssignedUserDisplayName { get; set; }
public string AssignedUserId { get; set; }
public string ComputerName { get; set; }
public string DeviceModelDescription { get; set; }
public string DeviceProfileDescription { get; set; }
public int JobCount { get; set; }
public DateTime? DecommissionedDate { get; set; }
public string SerialNumber { get; set; }
}
}
+17 -17
View File
@@ -1,17 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.BI.Search
{
public class UserSearchResultItem
{
public int AssignedDevicesCount { get; set; }
public string DisplayName { get; set; }
public string GivenName { get; set; }
public string Id { get; set; }
public int JobCount { get; set; }
public string Surname { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Disco.Models.BI.Search
{
public class UserSearchResultItem
{
public int AssignedDevicesCount { get; set; }
public string DisplayName { get; set; }
public string GivenName { get; set; }
public string Id { get; set; }
public int JobCount { get; set; }
public string Surname { get; set; }
}
}