/// <inheritdoc /> public TInterface CreateGrain <TInterface>(Type implementation, params object[] parameters) where TInterface : class { ulong objectId; lock (_syncRoot) { objectId = _nextObjectId++; } _subjectHostProxy.CreateSubject1(objectId, implementation, typeof(TInterface)); var proxy = _client.CreateProxy <TInterface>(objectId); return(proxy); }
/// <inheritdoc /> public TInterface CreateGrain <TInterface>(Type implementation, params object[] parameters) where TInterface : class { if (Log.IsDebugEnabled) { Log.DebugFormat("Creatign grain of type '{0}' implementing interface '{1}'", implementation.FullName, typeof(TInterface).FullName); } ulong objectId; lock (_syncRoot) { objectId = _nextObjectId++; } var interfaceType = typeof(TInterface); _subjectHost.CreateSubject1(objectId, implementation, interfaceType); var proxy = _endPoint.CreateProxy <TInterface>(objectId); return(proxy); }