Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8241591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T20:52:54+00:00 2026-06-07T20:52:54+00:00

I want to write the following line with script sharp: App.SP = SP =

  • 0

I want to write the following line with script sharp:

App.SP = SP = Ember.Object.extend({
init: function (lineV, lineH, resourceMethod){...

Is this possible? how can I do it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T20:52:57+00:00Added an answer on June 7, 2026 at 8:52 pm

    In general, every script framework comes with its own variant pattern of defining classes, and script# doesn’t support all possible variants… so you can write a c# class called SP, with an Init method, and expect the EmberJS way of defining classes is the result.

    What you could do is define classes for Ember.Object with an extend method that takes a dictionary, populate the dictionary with a bunch of name/value pairs, for example “init” with a value set to a delegate to a static method.

    Example (this is just a start, which I am sure will require tweaking and more reworking if you continue this path):

    In an import library:

    namespace EmberApi {
    
        [Imported, ScriptNamespace("Ember"), ScriptName("Object")]
        public static class EmberObject {
    
            public static object Extend(Dictionary<string, object> nameValuePairs) {
                return null;
            }
        }
    }
    

    And in your code:

    public static void App {
    
        static App() {
            Dictionary<string, object> members = new Dictionary<string, object>();
            members["init"] = Init;
    
            object sp = EmberObject.Extend(members);
        }
    
        public static void Init(int lineV, int lineH, string resourceMethod) { ... }
    }
    

    So I think it is possible, but you’re loosing a bunch of value prop, which is to write your code like c#.

    A better fit is to be able to consume existing APIs/frameworks, but write your own code as regular c# classes, that leverage the script# pattern of transforming those type constructs into script.

    If there are suggestions on the pattern itself, more than welcome, esp. since there is thought on making the script# pattern considerably lighter weight going into the future.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to write the following procedure / function: procedure ShowSysPopup(aFile: string; x, y:
I want to write the following C# code equivalent in JavaScript/jQuery (x == 0
I want to write my xml with following format. How can i do it?I
I want to write a .xml file using the following code into the App_Data/posts.
I want to write a SQL query like the following. Its syntax is not
I want to write a procedure to perform a delete for the following i
I wrote the following regex in perl and now i want to write it
I want to create URL re-write rules for following URL in htaccess. http://example.com/vedios/category/fun/ ->
I want to call the Sleep function on ASM. So I wrote the following:
I have a bash-script (let's call it /usr/bin/bosh ) using the following she-bang line:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.