当前位置: 首页>>代码示例>>C#>>正文


C# Root类代码示例

本文整理汇总了C#中Root的典型用法代码示例。如果您正苦于以下问题:C# Root类的具体用法?C# Root怎么用?C# Root使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Root类属于命名空间,在下文中一共展示了Root类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ToggleButton

 public ToggleButton(Root root, string id, BooleanControlProperties properties)
     : base(root, id, properties)
 {
     _id = id;
     AddDisplayModes();
     StateProperties[ToggleButtonCommandProperties.On] = false.ToString();
 }
开发者ID:modulexcite,项目名称:IL2JS,代码行数:7,代码来源:togglebutton.cs

示例2: Test_List1ContainsList2

        public void Test_List1ContainsList2()
        {
            var list1 = new List<object>();
            var list2 = new List<object>();
            var root = new Root(list1, list2);
            list1.Add(list2);

            var factory = new PropertyFactory(new PropertyProvider());
            Property p = factory.CreateProperty("Root", root);

            // Always 2 properties in Root
            var complexProperty = p as ComplexProperty;
            Assert.IsNotNull(complexProperty);
            Assert.AreEqual(2, complexProperty.Properties.Count);
            Assert.AreEqual(1, complexProperty.Reference.Count);
            Assert.IsFalse(complexProperty.Reference.IsProcessed);

            // Both lists are of CollectionProperty
            var lp1 = complexProperty.Properties[0] as CollectionProperty;
            Assert.IsNotNull(lp1);
            var lp2 = complexProperty.Properties[1] as CollectionProperty;
            Assert.IsNotNull(lp2);

            Assert.AreEqual(1, lp1.Items.Count);
            var lp1i1 = lp1.Items[0] as CollectionProperty;
            Assert.IsNotNull(lp1i1);
            Assert.AreNotEqual(lp1i1, lp2);

            Assert.AreEqual(lp1i1.Reference, lp2.Reference);
            Assert.AreEqual(2, lp1i1.Reference.Count);
        }
开发者ID:holisticware-admin,项目名称:MonoVersalSharpSerializer,代码行数:31,代码来源:PropertyFactoryTests.cs

示例3: CreateRoot

 private Root CreateRoot()
 {
     var root = new Root();
     root.RenderSystem = root.GetRenderSystemByName("Direct3D9 Rendering Subsystem");
     root.Initialise(false);
     return root;
 }
开发者ID:crescent,项目名称:SubmarineSim3D,代码行数:7,代码来源:Sim.cs

示例4: GetReplacedHtml

        /// <summary>
        /// Gets the replaced HTML.
        /// </summary>
        /// <param name="stringBuilder">The string builder.</param>
        /// <param name="model">The model.</param>
        /// <returns>HTML with replaced model values</returns>
        public override System.Text.StringBuilder GetReplacedHtml(System.Text.StringBuilder stringBuilder, Root.ViewModels.Cms.RenderPageViewModel model)
        {
            var image = model.GetPageSecondaryImageModel();
            stringBuilder = GetReplacedHtml(stringBuilder, image != null ? image.PublicUrl : null);

            return stringBuilder;
        }
开发者ID:Steinerd,项目名称:BetterCMS,代码行数:13,代码来源:RenderingPageSecondaryImageUrlProperty.cs

示例5: DropDown

 public DropDown(Root root, string id, DropDownProperties properties, Menu menu)
     : base(root, id, properties, menu)
 {
     AddDisplayModes();
     StateProperties[DropDownCommandProperties.Value] = "";
     StateProperties[DropDownCommandProperties.SelectedItemId] = "";
 }
开发者ID:modulexcite,项目名称:IL2JS,代码行数:7,代码来源:dropdown.cs

示例6: Update3

 public object Update3(Root obj)
 {
   obj.TransactionalType = _transactionalType;
   obj.Data = "Update";
   obj.MarkAsOld();
   return obj;
 }
开发者ID:nschonni,项目名称:csla-svn,代码行数:7,代码来源:RootFactory.cs

示例7: GetReplacedHtml

        /// <summary>
        /// Gets the replaced HTML.
        /// </summary>
        /// <param name="stringBuilder">The string builder.</param>
        /// <param name="model">The model.</param>
        /// <returns>HTML with replaced model values</returns>
        public override System.Text.StringBuilder GetReplacedHtml(System.Text.StringBuilder stringBuilder, Root.ViewModels.Cms.RenderPageViewModel model)
        {
            var blog = model.GetBlogPostModel();
            stringBuilder = GetReplacedHtml(stringBuilder, blog != null ? blog.ActivationDate : (System.DateTime?)null);

            return stringBuilder;
        }
开发者ID:jeroenlorrentop,项目名称:BetterCMS,代码行数:13,代码来源:RenderingPageBlogActivationDateProperty.cs

示例8: CreateXmlDocument

 public Root CreateXmlDocument(SearchInputService input)
 {
     try
     {
         CrawlerHelper helper = new CrawlerHelper();
         Root root = new Root();
         root.Departure = input.DepartureCode;
         root.Arrival = input.ArrivalCode;
         CookieCollection cookieCollection = helper.getCookieCollection("https://ameliaweb5.intelisys.ca/VietJet/ameliapost.aspx?lang=vi", "POST", getPostdata(input));
         HtmlDocument htmld = helper.getDocument("https://ameliaweb5.intelisys.ca/VietJet/ameliapost.aspx?lang=vi", "POST", getPostdata2(input), cookieCollection);
         root.outBound = new OutInBound();
         root.inBound = new OutInBound();
         root.AirLine = AirLineName.vietJetAir;
         HtmlNodeCollection collection;
         try
         {
             collection = htmld.DocumentNode.SelectNodes("//div[@id='toDepDiv']/div[@id='travOpsMain']/table[1]/tr[7]/td/table[1]/tr");
             root.outBound.Items = getitems(input.DepartTime,input, collection);
         }
         catch { }
         //chieu ve
         if (input.IsRoundTrip)
         {
             collection = htmld.DocumentNode.SelectNodes("//div[@id='toRetDiv']/div[@id='travOpsMain']/table[1]/tr[7]/td/table[1]/tr");
             root.inBound.Items = getitems(input.ReturnTime,input, collection);
         }
         return root;
     }
     catch
     {
         return null;
     }
 }
开发者ID:nvphuong92,项目名称:do-an-tot-nghiep1,代码行数:33,代码来源:VietJetAir.cs

示例9: DeSerialisoiIdSeach

        public static void DeSerialisoiIdSeach(string imdbID, ref Root leffat)
        {
            string url = "http://www.omdbapi.com/?i=" + imdbID + "&r=xml&plot=full";
            XmlSerializer deserializer = new XmlSerializer(typeof(Root));
            try
            {
                HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(url);
                myRequest.AllowAutoRedirect = true;
                myRequest.Method = "GET";
                myRequest.Timeout = 6000;
                WebResponse myResponse = myRequest.GetResponse();

                XmlTextReader reader = new XmlTextReader(myResponse.GetResponseStream());

                leffat = (Root)deserializer.Deserialize(reader);
                reader.Close();
                myResponse.Close();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {

            }
        }
开发者ID:Jeeqqq,项目名称:IIO13200-HTYO-Shareyourmovies,代码行数:27,代码来源:SearchResult.cs

示例10: InitRenderSystem

        /// <summary>
        /// Initialises the render system, tells it to use directx, windowed, etc
        /// </summary>
        private static RenderSystem InitRenderSystem(Root root)
        {
            Launch.Log("[Loading] Creating RenderSystem...");

            if (root.RenderSystem == null) {
                var renderSystem = root.GetRenderSystemByName("Direct3D9 Rendering Subsystem");
                renderSystem.SetConfigOption("Full Screen", Options.Get("Full Screen"));
                renderSystem.SetConfigOption("Floating-point mode", Options.Get("Floating-point mode"));
                renderSystem.SetConfigOption("VSync", Options.Get("VSync"));
                renderSystem.SetConfigOption("VSync Interval", Options.Get("VSync Interval"));
                renderSystem.SetConfigOption("FSAA", Options.Get("FSAA"));
                renderSystem.SetConfigOption("Video Mode", Options.Get("Video Mode"));
                renderSystem.SetConfigOption("sRGB Gamma Conversion", Options.Get("sRGB Gamma Conversion"));

                root.RenderSystem = renderSystem;
            }

            #if DEBUG
            // print out the things we can support
            var renderList = root.GetAvailableRenderers();
            foreach (var renderSystem in renderList) {
                Launch.Log("\n**** Available options for Render System: " + renderSystem.Name + " ****");
                foreach (var option in renderSystem.GetConfigOptions()) {
                    Launch.Log("\t" + option.Key);
                    foreach (var p in option.Value.possibleValues) {
                        Launch.Log("\t\t" + p);
                    }
                }
                Launch.Log("***********************************");
            }
            #endif

            return root.RenderSystem;
        }
开发者ID:CisciarpMaster,项目名称:PonyKart,代码行数:37,代码来源:LKernel+(ogre+initialisers).cs

示例11: GetReplacedHtml

        /// <summary>
        /// Gets the replaced HTML.
        /// </summary>
        /// <param name="stringBuilder">The string builder.</param>
        /// <param name="model">The model.</param>
        /// <returns>HTML with replaced model values</returns>
        public override System.Text.StringBuilder GetReplacedHtml(System.Text.StringBuilder stringBuilder, Root.ViewModels.Cms.RenderPageViewModel model)
        {
            var category = model.GetPageCategoryModel();
            stringBuilder = GetReplacedHtml(stringBuilder, category != null ? category.Name : null);

            return stringBuilder;
        }
开发者ID:Steinerd,项目名称:BetterCMS,代码行数:13,代码来源:RenderingPageCategoryProperty.cs

示例12: GalleryButton

 /// <summary>
 /// Creates a GalleryButton control.
 /// </summary>
 /// <param name="root">The Root that this control is in</param>
 /// <param name="id">The ID of this control</param>
 /// <param name="properties">The properties of this control</param>
 /// <param name="dims">The dimensions of this control</param>
 public GalleryButton(Root root, string id, GalleryButtonProperties properties, GalleryElementDimensions dims)
     : base(root, id, properties)
 {
     AddDisplayMode("Large");
     AddDisplayMode("Menu");
     ElementDimensions = dims;
 }
开发者ID:modulexcite,项目名称:IL2JS,代码行数:14,代码来源:gallerybutton.cs

示例13: Create

 public static DTOBase Create(FileInfo info, Root root)
 {
     if (info == null)
         throw new ArgumentNullException("info");
     if (root == null)
         throw new ArgumentNullException("root");
     string parentPath = info.Directory.FullName.Substring(root.Directory.FullName.Length);
     string relativePath = info.FullName.Substring(root.Directory.FullName.Length);
     FileDTO response;
     if (root.CanCreateThumbnail(info))
     {
         ImageDTO imageResponse = new ImageDTO();
         imageResponse.Thumbnail = root.GetExistingThumbHash(info) ?? (object)1;
         var dim = root.GetImageDimension(info);
         imageResponse.Dimension = string.Format("{0}x{1}", dim.Width, dim.Height);
         response = imageResponse;
     }
     else
     {
         response = new FileDTO();
     }
     response.Read = 1;
     response.Write = root.IsReadOnly ? (byte)0 : (byte)1;
     response.Locked = (root.LockedFolders.Any(f => f == info.Directory.Name) || root.IsLocked) ? (byte)1 : (byte)0;
     response.Name = info.Name;
     response.Size = info.Length;
     response.UnixTimeStamp = (long)(info.LastWriteTimeUtc - _unixOrigin).TotalSeconds;
     response.Mime = Helper.GetMimeType(info);
     response.Hash = root.VolumeId + Helper.EncodePath(relativePath);
     response.ParentHash = root.VolumeId + Helper.EncodePath(parentPath.Length > 0 ? parentPath : info.Directory.Name);
     return response;
 }
开发者ID:rengasamy,项目名称:elFinder.Net,代码行数:32,代码来源:DTOBase.cs

示例14: CreateConnection

        static public IDbConnection CreateConnection(Root dbRoot, string database)
		{
            IDbConnection cn = PostgreSQLDatabases.CreateConnection(dbRoot.ConnectionString);
			cn.Open();
			cn.ChangeDatabase(database);
			return cn;
		}
开发者ID:stacyjeptha,项目名称:EntitySpaces-CompleteSource,代码行数:7,代码来源:ConnectionHelper.cs

示例15: Fetch

 public object Fetch()
 {
   var obj = new Root();
   obj.Data = "Fetch";
   obj.MarkAsOld();
   return obj;
 }
开发者ID:nschonni,项目名称:csla-svn,代码行数:7,代码来源:RootFactory.cs


注:本文中的Root类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。