diff --git a/src/FMData.Rest/FileMakerRestClient.cs b/src/FMData.Rest/FileMakerRestClient.cs index 6eead1b..a71ee87 100644 --- a/src/FMData.Rest/FileMakerRestClient.cs +++ b/src/FMData.Rest/FileMakerRestClient.cs @@ -269,6 +269,7 @@ public async Task LogoutAsync() #region Special Implementations /// + [Obsolete("Use SendAsync() instead. See also: https://github.com/fuzzzerd/fmdata/pull/326")] public override async Task> FindAsync( string layout, Dictionary req) @@ -308,6 +309,7 @@ public override async Task> FindAsync( /// /// The find request field/value dictionary to pass into FileMaker server. /// A wrapped in a FindResponse containing both record data and portal data. + [Obsolete("Use SendAsync() instead. See also: https://github.com/fuzzzerd/fmdata/pull/326")] public override async Task>> SendAsync(IFindRequest> req) { if (string.IsNullOrEmpty(req.Layout)) throw new ArgumentException("Layout is required on the request."); diff --git a/src/FMData.Xml/FileMakerXmlClient.cs b/src/FMData.Xml/FileMakerXmlClient.cs index 06a0e92..0e4afd3 100644 --- a/src/FMData.Xml/FileMakerXmlClient.cs +++ b/src/FMData.Xml/FileMakerXmlClient.cs @@ -100,12 +100,14 @@ public override Task GetByFileMakerIdAsync(string layout, int fileMakerId, /// /// Find a record using a dictionary of input parameters. /// + [Obsolete("Use SendAsync() instead. See also: https://github.com/fuzzzerd/fmdata/pull/326")] public override Task>> SendAsync(IFindRequest> req) { throw new NotImplementedException(); } /// + [Obsolete("Use SendAsync() instead. See also: https://github.com/fuzzzerd/fmdata/pull/326")] public override Task> FindAsync( string layout, Dictionary req) diff --git a/src/FMData/FileMakerApiClientBase.cs b/src/FMData/FileMakerApiClientBase.cs index f28550f..5051889 100644 --- a/src/FMData/FileMakerApiClientBase.cs +++ b/src/FMData/FileMakerApiClientBase.cs @@ -267,7 +267,7 @@ public Task CreateAsync( /// /// The database to query. /// The names of the layouts in the specified database. - [Obsolete] + [Obsolete("Cannot call Metadata method on different file than open file. https://github.com/fuzzzerd/fmdata/issues/117")] public Task> GetLayoutsAsync(string database) { if (database != FileName) @@ -288,7 +288,7 @@ public Task> GetLayoutsAsync(string database /// /// The database to query. /// The names of the scripts in the specified database. - [Obsolete] + [Obsolete("Cannot call Metadata method on different file than open file. https://github.com/fuzzzerd/fmdata/issues/117")] public Task> GetScriptsAsync(string database) { if (database != FileName) @@ -311,7 +311,7 @@ public Task> GetScriptsAsync(string database /// The layout to get data about. /// Optional RecordId, for getting layout data specific to a record. ValueLists, etc. /// An instance of the LayoutMetadata class for the specified layout. - [Obsolete] + [Obsolete("Cannot call Metadata method on different file than open file. https://github.com/fuzzzerd/fmdata/issues/117")] public Task GetLayoutAsync(string database, string layout, int? recordId = null) { if (database != FileName) @@ -628,6 +628,7 @@ public Task DeleteAsync( /// /// Send a Find Record request to the FileMaker API. /// + [Obsolete("Use SendAsync() instead. See also: https://github.com/fuzzzerd/fmdata/pull/326")] public abstract Task>> SendAsync(IFindRequest> req); /// @@ -673,7 +674,9 @@ public virtual async Task> SendAsync( Func modId = null) where TResponse : class, new(); #endregion + /// + [Obsolete("Use SendAsync() instead. See also: https://github.com/fuzzzerd/fmdata/pull/326")] public abstract Task> FindAsync(string layout, Dictionary req); /// diff --git a/src/FMData/IFileMakerApiClient.cs b/src/FMData/IFileMakerApiClient.cs index 18e7bb9..f94a8e5 100644 --- a/src/FMData/IFileMakerApiClient.cs +++ b/src/FMData/IFileMakerApiClient.cs @@ -166,7 +166,7 @@ public interface IFileMakerApiClient /// /// The database to query. /// The names of the layouts in the specified database. - [Obsolete] + [Obsolete("Cannot call Metadata method on different file than open file. https://github.com/fuzzzerd/fmdata/issues/117")] Task> GetLayoutsAsync(string database); /// @@ -182,7 +182,7 @@ public interface IFileMakerApiClient /// The layout to get data about. /// Optional RecordId, for getting layout data specific to a record. ValueLists, etc. /// An instance of the LayoutMetadata class for the specified layout. - [Obsolete] + [Obsolete("Cannot call Metadata method on different file than open file. https://github.com/fuzzzerd/fmdata/issues/117")] Task GetLayoutAsync(string database, string layout, int? recordId = null); /// @@ -198,7 +198,7 @@ public interface IFileMakerApiClient /// /// The database to query. /// The names of the scripts in the specified database. - [Obsolete] + [Obsolete("Cannot call Metadata method on different file than open file. https://github.com/fuzzzerd/fmdata/issues/117")] Task> GetScriptsAsync(string database); /// @@ -295,6 +295,7 @@ public interface IFileMakerApiClient /// /// /// + [Obsolete("Use SendAsync() instead. See also: https://github.com/fuzzzerd/fmdata/pull/326")] Task> FindAsync(string layout, Dictionary req); #endregion @@ -443,6 +444,7 @@ Task UpdateContainerAsync( /// Find a record or records matching the request. /// /// Find request. + [Obsolete("Use SendAsync() instead. See also: https://github.com/fuzzzerd/fmdata/pull/326")] Task>> SendAsync(IFindRequest> req); /// diff --git a/tests/FMData.Rest.Tests/Find.SendAsync.Tests.cs b/tests/FMData.Rest.Tests/Find.SendAsync.Tests.cs index bca5120..07ac33a 100644 --- a/tests/FMData.Rest.Tests/Find.SendAsync.Tests.cs +++ b/tests/FMData.Rest.Tests/Find.SendAsync.Tests.cs @@ -14,6 +14,7 @@ namespace FMData.Rest.Tests public class FindRequestTests { [Fact] + [Obsolete] public async Task SendAsync_Find_Should_ReturnData() { var fdc = FindTestsHelpers.GetMockedFDC(); @@ -36,6 +37,7 @@ public async Task SendAsync_EmptyFind_ShouldReturnMany() } [Fact] + [Obsolete] public async Task SendAsync_FindWithoutQuery_ShouldConvertToGetRange_AndReturnMany() { var fdc = FindTestsHelpers.GetMockedFDC(); @@ -46,7 +48,8 @@ public async Task SendAsync_FindWithoutQuery_ShouldConvertToGetRange_AndReturnMa } [Fact] - public async Task SendAsync_FindWithoutlayout_ShouldThrowArgumentException() + [Obsolete] + public async Task SendAsync_FindWithoutLayout_ShouldThrowArgumentException() { var fdc = FindTestsHelpers.GetMockedFDC(); @@ -166,6 +169,7 @@ public async Task SendAsyncFind_WithoutLayout_ShouldThrow() } [Fact] + [Obsolete] public async Task SendAsync_Dictionary_WithPortals_ShouldHaveData() { // arrange