Coder Social home page Coder Social logo

Comments (5)

michaelhofer-slg avatar michaelhofer-slg commented on September 2, 2024

I'm not sure if this helps, but we were able to browse the tree of a compact engine when using ChildrenRetrievalPolicy.DirectOnly. This workaround is explained here: #39

from ember-plus-sharp.

sronline avatar sronline commented on September 2, 2024

@michaelhofer-slg: do you have a code sample for the workaround you explained?

I tried with this code, but can only get the root of the tree (SapphireCompact):

using (var consumer = await Consumer<SapphireRoot>.CreateAsync(client, 10000, ChildrenRetrievalPolicy.DirectOnly))          
  {
  INode root = consumer.Root;

  foreach (var child in root.Children)
  {
     if (child is INode)
     {
        ((INode)child).ChildrenRetrievalPolicy = ChildrenRetrievalPolicy.DirectOnly;
        log("Child " + child.Identifier);

         await consumer.SendAsync();
      }
   }
}

output is: Child SapphireCompact

from ember-plus-sharp.

KimonHoffmann avatar KimonHoffmann commented on September 2, 2024

Could it be that the Saphire Compact uses one more level of indirection and the SaphireCompact node really is the only child at this level?

Have you tried traversing the children of the child node after the SendAsync() call returns?

from ember-plus-sharp.

sronline avatar sronline commented on September 2, 2024

I'm now able to get the ember tree of the SapphireCompact with the workaround posted in #39 (comment)

from ember-plus-sharp.

michaelhofer avatar michaelhofer commented on September 2, 2024

@sronline I'm sorry about the delayed reply. The mentioned comment is correct, you need to traverse the children of the child node again after the call returns. We do that with a recursive method and traverse the children of a given element as soon as we have received the reply to the first GetDirectory request.

from ember-plus-sharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.