//[Fx.Tag.SecurityNote(Critical = "Overrides critical inherited method")]
        //[SecurityCritical]
        ////[SuppressMessage(FxCop.Category.Security, FxCop.Rule.SecureGetObjectDataOverrides,
        //    //Justification = "Method is SecurityCritical")]
        //public override void GetObjectData(SerializationInfo info, StreamingContext context)
        //{
        //    base.GetObjectData(info, context);
        //    info.AddValue(InstanceKeyName, (InstanceKey != null && InstanceKey.IsValid) ? InstanceKey.Value : Guid.Empty, typeof(Guid));
        //}

        private static string ToMessage(InstanceKey instanceKey)
        {
            if (instanceKey != null && instanceKey.IsValid)
            {
                return(SRCore.KeyNotReadySpecific(instanceKey.Value));
            }
            return(SRCore.KeyNotReadyDefault);
        }
 private static string ToMessage(System.Runtime.DurableInstancing.InstanceKey instanceKey)
 {
     if ((instanceKey != null) && instanceKey.IsValid)
     {
         return(SRCore.KeyNotReadySpecific(instanceKey.Value));
     }
     return(SRCore.KeyNotReadyDefault);
 }