public static void RegisterShim(IShim shim) {
            lock (_syncLock) {
                CleanupShims();

                _shims.Add(new Weak<IShim>(shim));
                shim.HostContainer = _hostContainer;
            }
        }
        public static void RegisterShim(IShim shim)
        {
            lock (_syncLock) {
                CleanupShims();

                _shims.Add(new Weak <IShim>(shim));
                shim.HostContainer = _hostContainer;
            }
        }
Exemplo n.º 3
0
 public void Shim_Setup()
 {
     _shim          = new Shim();
     _shim.Vertical = VerticalAlignment.Center;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Constructs a proxy instance.
 /// </summary>
 /// <param name="serviceContractInterfaceName">An assembly-qualified service contract name.</param>
 /// <param name="useServerSideShim">True to use server-side shim, false for client-side.</param>
 public JsmlServiceProxy(string serviceContractInterfaceName, bool useServerSideShim)
 {
     _serviceContractName = serviceContractInterfaceName;
 	_shim = useServerSideShim ? (IShim) new ServerSideShim() : new ClientSideShim();
 }
Exemplo n.º 5
0
 public void Shim_Setup()
 {
     _shim          = new Shim();
     _shim.Vertical = VerticalAlignment.Bottom;
 }
Exemplo n.º 6
0
        private IModule ResolveShimModule(IEnumerable<string> subFolders, IShim shim)
        {
            var serializer = new JavaScriptSerializer();
            string content = null;

            var dependencies = shim
                .Dependencies
                .OrEmpty()
                .Select(d => this.Resolve(subFolders, d))
                .ToList();

            var fileName = this.GetModuleFileName(this.GetModulePath(shim.Id));
            if (this.fileSystem.FileExists(fileName))
            {
                content = fileSystem.ReadToEnd(fileName);
                content = string.Format(
                    "define({0}, {1}, function() {{ {2}; return {3}; }});",
                    serializer.Serialize(shim.Id),
                    serializer.Serialize(dependencies.Select(d => d.Id)),
                    content,
                    shim.Export);
            }

            return new Module
            {
                Id = shim.Id,
                Dependencies = dependencies,
                Content = content
            };
        }
Exemplo n.º 7
0
 /// <summary>
 /// Constructs a proxy instance.
 /// </summary>
 /// <param name="serviceContractInterfaceName">An assembly-qualified service contract name.</param>
 /// <param name="useServerSideShim">True to use server-side shim, false for client-side.</param>
 public JsmlServiceProxy(string serviceContractInterfaceName, bool useServerSideShim)
 {
     _serviceContractName = serviceContractInterfaceName;
     _shim = useServerSideShim ? (IShim) new ServerSideShim() : new ClientSideShim();
 }
Exemplo n.º 8
0
 public void ShimTests_Setup()
 {
     _shim = new Shim();
 }
Exemplo n.º 9
0
 public void Shim_Setup()
 {
     _shim            = new Shim();
     _shim.Horizontal = HorizontalAlignment.Center;
 }
        // For testing
        internal PrettyTextWriterTraceListener(string fileName, IShim shim)
#if NETFRAMEWORK
            : base(GetFullPath(fileName, shim))
        {
        }
Exemplo n.º 11
0
 public void ShimTests_HorizontalRight_Setup()
 {
     _shim            = new Shim();
     _shim.Horizontal = HorizontalAlignment.Right;
 }