You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a difference between a method simply being in an extension vs. being in an extension and having the extra powers that come from being attributed with DataSource.Kind.
For clarity and to avoid confusion, as I write and speak about extensions, it would be nice to refer to the above two scenarios using the same terminology Microsoft uses for them. Does Microsoft have an official term for each of these scenarios? :-)
section MyExtension;
// scenario A
shared MyExtension.MethodInExtension = () => ...;
// scenario B
[DataSource.Kind="MyExtension"]
shared MyExtension.SuperPowerMethodInExtension = () => ...;
MyExtension = [ ... data source kind descriptor goes here .... ];
Scenario A - MyExtension.MethodInExtension()
Method behaves just like it would if it were run from consumer Query Editor, except that the #shared it sees may contain a different set of identifiers (e.g. a #shared that includes extension-only methods such as Environment.Configuration()).
Terminology Question: Would it be correct to say that this method is in extension context, as it is in the context of an extension?
Scenario B - MyExtension.SuperPowerMethodInExtension
Unlike scenario A, the attribution on this method gives it super-powers. For example, if it makes a Web.Contents call, that call can behave differently than it would if it were made from consumer code run in Query Editor or if it were made in scenario A's function expression.
Terminology Question: What's the correct term for this scenario? Would it be correct to say that this method is in enhanced extension context? Or, is it still in ordinary extension context (same as scenario A), just augmented with a special permission (e.g. an additional permission which shows up when an Extension.HasPermission check is done)?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
There is a difference between a method simply being in an extension vs. being in an extension and having the extra powers that come from being attributed with
DataSource.Kind.For clarity and to avoid confusion, as I write and speak about extensions, it would be nice to refer to the above two scenarios using the same terminology Microsoft uses for them. Does Microsoft have an official term for each of these scenarios? :-)
Scenario A -
MyExtension.MethodInExtension()Method behaves just like it would if it were run from consumer Query Editor, except that the
#sharedit sees may contain a different set of identifiers (e.g. a#sharedthat includes extension-only methods such asEnvironment.Configuration()).Terminology Question: Would it be correct to say that this method is in extension context, as it is in the context of an extension?
Scenario B -
MyExtension.SuperPowerMethodInExtensionUnlike scenario A, the attribution on this method gives it super-powers. For example, if it makes a
Web.Contentscall, that call can behave differently than it would if it were made from consumer code run in Query Editor or if it were made in scenario A's function expression.Terminology Question: What's the correct term for this scenario? Would it be correct to say that this method is in enhanced extension context? Or, is it still in ordinary extension context (same as scenario A), just augmented with a special permission (e.g. an additional permission which shows up when an
Extension.HasPermissioncheck is done)?Beta Was this translation helpful? Give feedback.
All reactions