This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[SitecoreClass] | |
public class DummyClass{ | |
[SitecoreField] | |
public virtual string MyField{get;set;} | |
[SitecoreField] | |
public virtual DateTime Date{get;set;} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.omg.CosNaming.NamingContextPackage.NotFound | |
// these are the data types | |
trait Tense{ | |
} | |
case object Past extends Tense | |
case object Present extends Tense | |
case object Future extends Tense |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_context = new Context( | |
config, | |
new MyModuleConfig(), | |
new MyModuleConfig2()); | |
//this class is in another assembly | |
public class MyModuleConfig : IModuleConfiguration{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyClass{ | |
public MyClass( | |
ISitecoreServiceFactory factory) | |
{ | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//from SitecoreClassConfig | |
internal delegate object Instantiator0(); | |
internal delegate object Instantiator1(object arg1); | |
internal delegate object Instantiator2(object arg1, object arg2); | |
internal Dictionary<string, Delegate> CreateObjectMethods { get; set; } | |
//From SitecoreService.cs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ISitecoreContext context = new SitecoreContext(); | |
this.Model = context.GetHomeItem<HomePage>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.UI; | |
using Glass.Sitecore.Mapper; | |
using System.Linq.Expressions; | |
namespace Glass.Demo.Application.Web.Controls | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.UI; | |
using System.Web.UI.WebControls; | |
using Glass.Demo.Application.Models.EdDemo; | |
using Glass.Demo.Application.Web.Controls; | |
namespace Glass.Demo.Website.layouts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TestSublayout.ascx.cs" Inherits="Glass.Demo.Website.layouts.TestSublayout" %> | |
<%= Field(x => x.Title) %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Control Language="C#" AutoEventWireup="true" Inherits="Glass.Demo.Application.Web.Controls.GlassDynamicUserControl, Glass.Demo.Application" %> | |
<h1>Dynamic Demo</h1> | |
<%=this.Model.Title %> | |
<%foreach(var child in this.Model.Children){ %> | |
<%= child.Name %> | |
<%} %> |
OlderNewer