/// <summary> /// Construct and return the function whose FunctionDef representation is /// serialized in <paramref name="proto"/> /// </summary> /// <param name="proto">Serialized FunctionDef</param> /// <param name="status">The status</param> public Function(byte[] proto, Status status = null) { using (StatusChecker checker = new StatusChecker(status)) { GCHandle handle = GCHandle.Alloc(proto, GCHandleType.Pinned); _ptr = TfInvoke.tfeFunctionImportFunctionDef(handle.AddrOfPinnedObject(), proto.Length, checker.Status); handle.Free(); } }