我在 Petrel 中有一个自定义的 Ocean 工作步骤,但我无法成功保存我的参数包。我的包包含 PillarGrid 对象(网格、属性、区域),如下所示:
[Archivable(Version = 1, Release = "2013.6")]
public class MyArguments : DescribedArgumentsByReflection, IIdentifiable
{
[Archived]
private Grid grid = Grid.NullObject;
[Archived]
private int seedNumber;
[Archived]
private int numberRealizations = 1;
[Archived]
private Zone regionZone = Zone.NullObject;
[Archived]
private Property property = Property.NullObject;
[Archived]
private Droid droid = Droid.Empty;
...
public DeeSseArguments()
: base()
{
// adding this to datasource
IDataSourceManager dsManager = DataManager.DataSourceManager;
string DataSourceId = DeeSseDataSourceFactory.DataSourceId;
StructuredArchiveDataSource dataSource = dsManager.GetSource(DataSourceId) as StructuredArchiveDataSource;
this.droid = dataSource.GenerateDroid();
dataSource.AddItem(this.droid, this);
}
}
我基于 StructuredArchiveDataSource 创建了一个 DataSourceFactory :
public class MyDataSourceFactory : DataSourceFactory
{
public static string DataSourceId = "MyArgsPackId";
public override Slb.Ocean.Core.IDataSource GetDataSource()
{
return new StructuredArchiveDataSource(DataSourceId, new[] { typeof(MyArguments) });
}
}
我在模块方法“集成”中注册了这个 DataSourceFactory。
当我尝试在 Petrel 中保存我的项目时,我收到以下错误消息:“System.Exception: MyArgsPackId: Not anarchivable type 'Slb.Ocean.Petrel.DomainObject.PillarGrid.Property'”
请问我该如何管理这种持久性?