删除「IElement」借口中的Clone与Encode/Decode方法

This commit is contained in:
zengwenjie
2025-09-19 21:29:11 +08:00
parent b6980faccd
commit 2498da8765
4 changed files with 25 additions and 59 deletions

View File

@@ -77,7 +77,18 @@ namespace Deedy.Activity
OnPropertyChanged(propertyName);
return true;
}
public void ReadyToWorking(IElement? element = null, Output? output = null)
public void LinkTo([AllowNull] IElement element)
{
throw new NotImplementedException();
}
public void Unlink()
{
throw new NotImplementedException();
}
public void ReadyToWorking(IElement? parent = null, Output? output = null)
{
throw new NotImplementedException();
}
@@ -91,25 +102,5 @@ namespace Deedy.Activity
{
throw new NotImplementedException();
}
public void LinkTo([AllowNull] IElement element)
{
throw new NotImplementedException();
}
public void Unlink()
{
throw new NotImplementedException();
}
public IElement? Clone()
{
throw new NotImplementedException();
}
public bool TryEncode(out string document)
{
throw new NotImplementedException();
}
}
}

View File

@@ -90,7 +90,17 @@ namespace Deedy.Activity
throw new NotImplementedException();
}
public void ReadyToWorking(IElement? element = null, Output? output = null)
public void LinkTo([AllowNull] IElement element)
{
throw new NotImplementedException();
}
public void Unlink()
{
throw new NotImplementedException();
}
public void ReadyToWorking(IElement? parent = null, Output? output = null)
{
throw new NotImplementedException();
}
@@ -104,25 +114,5 @@ namespace Deedy.Activity
{
throw new NotImplementedException();
}
public void LinkTo([AllowNull] IElement element)
{
throw new NotImplementedException();
}
public void Unlink()
{
throw new NotImplementedException();
}
public IElement? Clone()
{
throw new NotImplementedException();
}
public bool TryEncode(out string document)
{
throw new NotImplementedException();
}
}
}

View File

@@ -165,7 +165,7 @@ namespace Deedy.Activity
/// 将当前节点链接到一个节点上
/// </summary>
/// <param name="element">要链接到的节点</param>
public static void LinkTo(this IElement @this, [AllowNull] IElement element)
public static void Help_LinkTo(this IElement @this, [AllowNull] IElement element)
{
if (@this == null) return;
@@ -197,7 +197,7 @@ namespace Deedy.Activity
/// <summary>
/// 断开自身与父级节点的链接关系
/// </summary>
public static void Unlink(this IElement @this)
public static void Help_Unlink(this IElement @this)
{
if (@this == null) return;

View File

@@ -42,20 +42,5 @@ namespace Deedy.Activity
/// 断开自身与父级节点的链接关系
/// </summary>
public void Unlink();
public IElement? Clone();
public bool TryEncode(out string document);
public static virtual bool TryDecode(string document, out IElement? element)
{
IElement? instance = null;
bool result = false;
try
{
instance = XamlReader.Parse(document) as IElement;
result = instance != null;
}
catch { }
element = instance;
return result;
}
}
}