2016-11-19 79 views
0

我的多层项目有数据层,服务面板。 dataLayer引用到服务和引用到面板的服务。我曾在数据层的接口,有些东西一样装配参考

public interface IJournalEntity 
{ 
    ... 
} 

我的服务具有从IJournalEntity继承的类,

public class OfflinePaymentService : IOfflinePaymentService, IJournalEntity 
{ 
...     
} 

当我编译面板层,统一配置引发错误添加引用数据层,我怎么能修复引用那个?

回答

1

没有引用,你不能修复。如果您未参考该类型,则该类型对于您的项目而言是未知的。

一些类似的问题:

  1. Access interface methods without referring the class
  2. C# Use a class that implements an interface without adding a reference to the assembly that defines the interface

如果你的数据层是在一个单独的DLL中定义,你需要把在Assets/Plugins/。这适用于Unity3D 4.x. 在Unity3D 5.x的,只是把DLL中Assets会工作。