Table of Contents

Class ProjectServiceBase<T>

Namespace
H.Modules.Project
Assembly
H.Modules.Project.dll
[Display(Name = "工程数据", GroupName = "数据设置")]
public abstract class ProjectServiceBase<T> : BindableBase, INotifyPropertyChanged, IProjectService, ISplashSave, ISaveable, ISplashLoad, ILoadable, IDataSource<T> where T : IProjectItem

Type Parameters

T
Inheritance
ProjectServiceBase<T>
Implements
Derived
Inherited Members
Extension Methods

Constructors

ProjectServiceBase(IOptions<ProjectOptions>)

public ProjectServiceBase(IOptions<ProjectOptions> options)

Parameters

options IOptions<ProjectOptions>

Properties

Collection

[Browsable(false)]
public IEnumerable<T> Collection { get; }

Property Value

IEnumerable<T>

Current

[JsonIgnore]
[Browsable(false)]
public IProjectItem Current { get; set; }

Property Value

IProjectItem

CurrentChanged

[JsonIgnore]
[Browsable(false)]
public Action<IProjectItem, IProjectItem> CurrentChanged { get; set; }

Property Value

Action<IProjectItem, IProjectItem>

Name

public string Name { get; }

Property Value

string

Methods

Add(params T[])

public virtual void Add(params T[] ts)

Parameters

ts T[]

Clear()

public void Clear()

Create()

public abstract T Create()

Returns

T

Delete(params T[])

public virtual void Delete(params T[] ts)

Parameters

ts T[]

GetFolderPath()

protected virtual string GetFolderPath()

Returns

string

GetSerializer()

protected virtual ISerializerService GetSerializer()

Returns

ISerializerService

Load(out string)

public virtual bool Load(out string message)

Parameters

message string

Returns

bool

LoadDefaultProjects()

protected virtual Projects<T> LoadDefaultProjects()

Returns

Projects<T>

OnCurrentChanged(IProjectItem, IProjectItem)

protected virtual void OnCurrentChanged(IProjectItem o, IProjectItem n)

Parameters

o IProjectItem
n IProjectItem

OnItemChanged()

protected virtual void OnItemChanged()

Save(out string)

public virtual bool Save(out string message)

Parameters

message string

Returns

bool

Where(Func<IProjectItem, bool>)

public virtual IEnumerable<IProjectItem> Where(Func<IProjectItem, bool> func = null)

Parameters

func Func<IProjectItem, bool>

Returns

IEnumerable<IProjectItem>

Events

CollectionChanged

public event EventHandler CollectionChanged

Event Type

EventHandler