-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No match for field with name objectSpaceProviders and flags Instance | NonPublic | Public | Static on type #940
Comments
In 22.1.302 version |
please send a PR where u have tessted your suggestions and they work for you and happy to send a build. thanks for the understanding and help |
@vimarx since you also affected after @Siratigui PR could you also update us if his changes work for u for #939 |
It will take so much time for me to create a sample because the project is very customized. I think that you can face this error in any WorldCreator project. |
I do not want a sample, as I understand you modified the source right? can u push a PR with those modifications? |
nevermind just wanted you to take the credits for the fix, easier to do it myself. anyways feel free to PR any futures changes. thnks again pushin in lab now |
i do not see how it relates with #939 maybe I missunderstood? |
when opening the ModelDifference DetailView the expression application.GetFieldValue("objectSpaceProviders") is executed somewhere. application.GetFieldValue("objectSpaceProviders") is not valid anymore. you may change it anywhere it is called in the codes i guess. |
can u test in your WC code that this method works public static IEnumerable<IObjectSpaceProvider> AddObjectSpaceProvider(this XafApplication application, params IObjectSpaceProvider[] providers)
=> ((IList<IObjectSpaceProvider>)application.CallMethod("GetOrCreateObjectSpaceProviderContainer").GetFieldValue("_objectSpaceProviders")).AddRange(providers);
I want to use that method instead |
eXpand.lab release 22.1.302.1 includes commit that relate to this task: Please test if it addresses the problem. If you use nuget add our LAB NugetServer as a nuget package source in VS. To minimize version conflicts we recommend that you switch to PackageReference format and use only the eXpandAgnostic, eXpandWin, eXpandWeb packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video). Thanks a lot for your contribution. |
or simply if u do not have dependecies is like this public static partial class LinqExtensions{
public static T[] AddRange<T>(this IEnumerable<T> source,IEnumerable<T> enumerable,bool ignoreDuplicates=false)
=> source is IList<T> list
? enumerable.Where(arg => !ignoreDuplicates || !source.Contains(arg)).Execute(list.Add).ToArray()
: source.AddToArray(enumerable, ignoreDuplicates);
public static void Add(this IList source, object item, bool ignoreDuplicates=false) {
if (!ignoreDuplicates || !source.Contains(item)) {
source.Add(item);
}
}
public static T[] AddToArray<T>(this IEnumerable<T> source, T item, bool ignoreDuplicates = false) {
var enumerable = source as T[] ?? source.ToArray();
return !ignoreDuplicates && enumerable.Any(arg => arg.Equals(item))
? enumerable : enumerable.Concat(item.YieldItem()).ToArray();
}
public static T[] AddToArray<T>(this IEnumerable<T> source, IEnumerable<T> items, bool ignoreDuplicates = false)
=> items.SelectMany(arg => source.AddToArray(arg, ignoreDuplicates)).ToArray();
public static T Add<T>(this IList<T> source, T item, bool ignoreDuplicates = false) {
if (!ignoreDuplicates || !source.Contains(item)) {
source.Add(item);
return item;
}
return default;
}
}
|
this release was send before your suggestion to replace everything and apparently we need one method to rule them all and not search and replace the universe so that why i asked what I asked previoslt |
I tested the method it works. |
cool I need to push both repositories though as thi is going to live in Xpand.XAF.Extensions package of the RX repositories. So give me 1 day or 2 there are works in progress in the RX repo |
eXpand.lab release 22.1.302.2 includes commit that relate to this task: Please test if it addresses the problem. If you use nuget add our LAB NugetServer as a nuget package source in VS. To minimize version conflicts we recommend that you switch to PackageReference format and use only the eXpandAgnostic, eXpandWin, eXpandWeb packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video). Thanks a lot for your contribution. |
eXpand.lab release 22.2.400.0 includes commit that relate to this task:
Please test if it addresses the problem. If you use nuget add our LAB NugetServer as a nuget package source in VS. To minimize version conflicts we recommend that you switch to PackageReference format and use only the eXpandAgnostic, eXpandWin, eXpandWeb packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video). Thanks a lot for your contribution. |
Hi,
objectSpaceProviders access has been changed by DevExpress.
application.GetFieldValue("objectSpaceProviders") is not longer working.
Now can not open the model because it can not find objectSpaceProviders.
You can access now access it from:
application.GetFieldValue("_objectSpaceProviderContainer").GetFieldValue("_objectSpaceProviders")
I faced this error in WorldCreator and solved it by changing:
and
and
The text was updated successfully, but these errors were encountered: