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


C# FieldList类代码示例

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


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

示例1: TestItem

        public TestItem(FieldList fieldList, string itemName = "dummy")
            : base(new ID(new Guid()), 
                   new ItemData(new ItemDefinition(new ID(new Guid()), itemName, new ID(new Guid()), new ID(new Guid())), Language.Invariant, new Sitecore.Data.Version(1), fieldList),
                     TestDatabaseFactory.Create())

        {
        }
开发者ID:StephanieSpanjian,项目名称:Sitecore-Mvc-Contrib,代码行数:7,代码来源:TestItem.cs

示例2: ColumnInfo

		public ColumnInfo( ObjectMap objectMap, string[] columnNames )
		{
			this.columnNames = columnNames;
			columnComboHashCode = ObjectConstructor.GetFieldComboHashCode( columnNames );
			fields = new FieldList();
			for( int i = 0; i < columnNames.Length; i++ )
			{
				string columnName = columnNames[ i ];
				FieldMap fm = objectMap.GetFieldMapFromColumn( columnName );
				if( fm == null )
				{
					// check for column names with table name prefixes
					int pos = columnName.IndexOf( '.' );
					if( pos > 0 )
					{
						columnName = columnName.Substring( pos + 1, columnName.Length - pos - 1 );
						fm = objectMap.GetFieldMapFromColumn( columnName );
						if( fm != null )
						{
							columnNames[ i ] = columnName;
						}
					}
					if( fm == null ) // no corresponding member could be found - assume column is calculated
					{
						columnCalculatedMask |= 1 << i;
					}
				}
				fields.Add( fm ); // intentionally add null entries to preserve column order 
			}
		}
开发者ID:arangas,项目名称:MediaPortal-1,代码行数:30,代码来源:ColumnInfo.cs

示例3: CreateItemWithShowInMenuFalseShouldReturnEmptyString

 public void CreateItemWithShowInMenuFalseShouldReturnEmptyString()
 {
     FieldList stubFieldList = new FieldList();
     Item stub = new ContentItem(stubFieldList);
     string navigationTitle = ResultFactory.Create(stub);
     Assert.IsNotNull(navigationTitle);
 }
开发者ID:udt1106,项目名称:Sitecore-Item-Buckets,代码行数:7,代码来源:BucketTests.cs

示例4: CreateItemWithShowInMenuTrueShouldReturnItemNavigationTitle

 public void CreateItemWithShowInMenuTrueShouldReturnItemNavigationTitle()
 {
     FieldList stubFieldList = new FieldList();
     Item stub = new ContentItem(stubFieldList);
     string navigationTitle = ResultFactory.Create(stub);
     Assert.AreEqual("NavigationTitle", navigationTitle);
 }
开发者ID:udt1106,项目名称:Sitecore-Item-Buckets,代码行数:7,代码来源:BucketTests.cs

示例5: WhenReferencedProcessIsVersioningEnabled_VerionDateAndVersionNumberFieldsShouldBeAdded_CR

        public void WhenReferencedProcessIsVersioningEnabled_VerionDateAndVersionNumberFieldsShouldBeAdded_CR()
        {
            // Arrange.
            var done = false;

            var fieldList = new FieldList { IsVersioningEnabled = true };
            var vm = CreateReverseCrossRefDisplayFieldViewModel();

            Mock.Arrange(() => FieldList.BeginGetCrossReferenceSubfields(ReferencedProcessName, FieldName, Arg.IsAny<EventHandler<DataPortalResult<FieldList>>>()))
                .DoInstead<string, string, EventHandler<DataPortalResult<FieldList>>>((process, field, action) => action(null, new DataPortalResult<FieldList>(fieldList, null, null)));

            // Act.
            vm.LoadSubFields(() => { done = true; });

            // Assert.
            EnqueueConditional(() => done);
            EnqueueCallback(
                () =>
                    {
                        Assert.IsTrue(vm.Subfields.Any(f => f.SystemName == Constants.VersionNumber));
                        Assert.IsTrue(vm.Subfields.Any(f => f.SystemName == Constants.VersionDate));
                    });

            EnqueueTestComplete();
        }
开发者ID:mparsin,项目名称:Elements,代码行数:25,代码来源:ReverseCrossRefDisplayFieldViewModelTests.cs

示例6: FieldList

 public FieldList(Position pos, Symbol name, Symbol type, FieldList tail)
 {
     Pos = pos;
     Name = name;
     Type = type;
     Tail = tail;
 }
开发者ID:Nxun,项目名称:Naive-Tiger,代码行数:7,代码来源:AbstractSyntax.cs

示例7: BuildFromFieldList

 public static BoolList BuildFromFieldList(FieldList param)
 {
     if (param == null)
         return null;
     else
         return new BoolList(param.Escape, BuildFromFieldList(param.Tail));
 }
开发者ID:Nxun,项目名称:Naive-Tiger,代码行数:7,代码来源:Utilities.cs

示例8: ProcessShouldSetAreaControllerRendererIfDescendantOfAreaControllerTemplate

        public void ProcessShouldSetAreaControllerRendererIfDescendantOfAreaControllerTemplate()
        {
            // Arrange
            var builder = new Template.Builder("Area Controller Template", Constants.Templates.AreaController, new TemplateCollection());
            var fieldList = new FieldList
                {
                    {Constants.Fields.Controller.Action, "Index"},
                    {Constants.Fields.Controller.Name, "HelloWorld"},
                    {Constants.Fields.Controller.Area, "MyArea"},
                    {Constants.Fields.Controller.UseChildActionBehavior, "1"}
                };
            var innerItem = new TestItem(fieldList);

            var rendering = new Rendering { RenderingItem = new RenderingItem(innerItem)};
            _args.Rendering = rendering;
            _args.RenderingTemplate = builder.Template;

            _controller.ControllerRunner = new Mock<IControllerRunner>().Object;

            // Act
            _controller.Process(_args);

            // Assert
            Assert.That(_args.Result, Is.InstanceOf<AreaControllerRenderer>(), "Rendering should be an AreaControllerRenderer");
        }
开发者ID:PatriciaPecingina,项目名称:Sitecore-Mvc-Contrib,代码行数:25,代码来源:AreaControllerShould.cs

示例9: FakeItemAddFieldShouldReturnField

 public void FakeItemAddFieldShouldReturnField(FieldList fieldList,string fieldValue)
 {
     var fieldId = ID.NewID;
     fieldList.Add(fieldId,fieldValue);
     var fake = new FakeItem(fieldList);
     fake[fieldId].ShouldBeEquivalentTo(fieldValue);
 }
开发者ID:VGBenjamin,项目名称:Sitecore-Fakes,代码行数:7,代码来源:FakeItemTests.cs

示例10: Process

        public virtual void Process(GetItemFieldsArgs args)
        {
            Assert.ArgumentNotNull(args, "args");
            Assert.ArgumentNotNull(args.ItemDefinition, "args.ItemDefinition");
            Assert.ArgumentNotNull(args.Context, "args.Context");

            var itemId = args.ItemDefinition.ID;
            var fields = new FieldList();
            var owner = typeof(ContactFacetDataProvider).Name;
            fields.Add(Sitecore.FieldIDs.CreatedBy, owner);
            fields.Add(Sitecore.FieldIDs.Owner, owner);
            if (IDTableHelper.IsFacetItem(itemId))
            {
                var facetName = IDTableHelper.GetFacetName(itemId);
                fields.Add(Sitecore.FieldIDs.DisplayName, facetName);
                fields.Add(Sitecore.Strategy.Contacts.DataProviders.FieldIDs.ContactFacetName, facetName);
                var contractType = ContactFacetHelper.GetContractTypeForFacet(facetName);
                if (contractType != null)
                {
                    fields.Add(Sitecore.Strategy.Contacts.DataProviders.FieldIDs.ContactFacetContract, contractType.AssemblyQualifiedName);
                    if (ContactFacetHelper.ContactFacetImplementations.ContainsKey(contractType))
                    {
                        var implType = ContactFacetHelper.ContactFacetImplementations[contractType];
                        if (implType != null)
                        {
                            fields.Add(Sitecore.Strategy.Contacts.DataProviders.FieldIDs.ContactFacetImplementation, implType.AssemblyQualifiedName);
                        }
                    }
                }
            }
            if (IDTableHelper.IsFacetMemberItem(itemId))
            {
                var memberName = IDTableHelper.GetFacetMemberName(itemId);
                fields.Add(Sitecore.FieldIDs.DisplayName, memberName);
                fields.Add(Sitecore.Strategy.Contacts.DataProviders.FieldIDs.ContactFacetMemberName, memberName);
                var facetId = IDTableHelper.GetFacetMemberParentId(itemId);
                var facetName = IDTableHelper.GetFacetName(facetId);
                var memberType = ContactFacetHelper.GetFacetMemberType(facetName, memberName);
                if (memberType != null)
                {
                    fields.Add(Sitecore.Strategy.Contacts.DataProviders.FieldIDs.ContactFacetMemberType, memberType.AssemblyQualifiedName);
                }
            }
            if (IDTableHelper.IsFacetMemberValueItem(itemId))
            {
                var value = IDTableHelper.GetFacetMemberValue(itemId);
                if (!string.IsNullOrEmpty(value))
                {
                    fields.Add(Sitecore.Strategy.Contacts.DataProviders.FieldIDs.ContactFacetMemberValueValue, value);
                }
                var description = IDTableHelper.GetFacetMemberValueDescription(itemId);
                if (!string.IsNullOrEmpty(description))
                {
                    fields.Add(Sitecore.FieldIDs.DisplayName, description);
                    fields.Add(Sitecore.Strategy.Contacts.DataProviders.FieldIDs.ContactFacetMemberValueDescription, description);
                }
            }
            args.FieldList = fields;
        }
开发者ID:boro2g,项目名称:sitecore-contact-utilities,代码行数:59,代码来源:DefaultProcessor.cs

示例11: FakeItem

 public FakeItem(FieldList fieldList, ID itemid, ID templateId, string itemName = DefaultitemName, string databaseName = DefaultDatabaseName)
     : base(itemid,
         new ItemData(new ItemDefinition(ID.NewID, itemName, templateId, ID.NewID),
                      Globalization.Language.Invariant, new Data.Version(1), fieldList),
         new Database(databaseName))
 {
     FakeChildren = new ItemList();
 }
开发者ID:VGBenjamin,项目名称:Sitecore-Fakes,代码行数:8,代码来源:FakeItem.cs

示例12: Resolve

 public Resolve(string name, params string[] shows)
 {
     Name = name;
     Show = new FieldList();
     foreach (var show in shows) {
         Show.Add(show);
     }
 }
开发者ID:Krusen,项目名称:soe-census-api-csharp,代码行数:8,代码来源:Resolve.cs

示例13: FakeItemGetFieldFromIdShoudlReturnFieldValue

        public void FakeItemGetFieldFromIdShoudlReturnFieldValue(string fieldValue, FieldList fieldList)
        {
            var fieldId = ID.NewID;

            fieldList.Add(fieldId, fieldValue);
            var fake = new FakeItem(fieldList);

            fake[fieldId].ShouldAllBeEquivalentTo(fieldValue);
        }
开发者ID:VGBenjamin,项目名称:Sitecore-Fakes,代码行数:9,代码来源:FakeItemTests.cs

示例14: FunctionDeclaration

 public FunctionDeclaration(Position pos, Symbol name, FieldList param, NameType result, Expression body, FunctionDeclaration next)
 {
     Pos = pos;
     Name = name;
     Param = param;
     Result = result;
     Body = body;
     Next = next;
 }
开发者ID:Nxun,项目名称:Naive-Tiger,代码行数:9,代码来源:AbstractSyntax.Declaration.cs

示例15: FakeItemAddMultipleFieldShouldReturnField

        public void FakeItemAddMultipleFieldShouldReturnField(FieldList fieldList, string fieldValue)
        {
            var fieldIdOne = ID.NewID;
            var fieldIdTwo = ID.NewID;
            fieldList.Add(fieldIdOne, fieldValue);
            fieldList.Add(fieldIdTwo, fieldValue);
            var fake = new FakeItem(fieldList);

            fake.Fields.Should().HaveCount(2);
        }
开发者ID:VGBenjamin,项目名称:Sitecore-Fakes,代码行数:10,代码来源:FakeItemTests.cs


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