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


C# Revision类代码示例

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


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

示例1: should_be_greater_when_first_quality_is_a_proper

        public void should_be_greater_when_first_quality_is_a_proper()
        {
            var first = new Revision(version: 2);
            var second = new Revision();

            first.Should().BeGreaterThan(second);
        }
开发者ID:Djohnnie,项目名称:Sonarr,代码行数:7,代码来源:RevisionComparableFixture.cs

示例2: should_be_lesser_when_second_quality_is_a_proper

        public void should_be_lesser_when_second_quality_is_a_proper()
        {
            var first = new Revision();
            var second = new Revision(version: 2);

            first.Should().BeLessThan(second);
        }
开发者ID:Djohnnie,项目名称:Sonarr,代码行数:7,代码来源:RevisionComparableFixture.cs

示例3: SetupTestContentData

        public static Content SetupTestContentData(Guid newGuid, Guid newGuidRedHerring, ProviderSetup providerSetup)
        {
            var baseEntity = HiveModelCreationHelper.MockTypedEntity();
            var entity = new Content(baseEntity); 
            entity.Id = new HiveId(newGuid);
            entity.EntitySchema.Alias = "schema-alias1";

            var existingDef = entity.EntitySchema.AttributeDefinitions[0];
            var newDef = HiveModelCreationHelper.CreateAttributeDefinition("aliasForQuerying", "", "", existingDef.AttributeType, existingDef.AttributeGroup, true);
            entity.EntitySchema.AttributeDefinitions.Add(newDef);
            entity.Attributes.Add(new TypedAttribute(newDef, "my-new-value"));

            entity.Attributes[1].DynamicValue = "not-on-red-herring";
            entity.Attributes[NodeNameAttributeDefinition.AliasValue].Values["UrlName"] = "my-test-route";

            var redHerringEntity = HiveModelCreationHelper.MockTypedEntity();
            redHerringEntity.Id = new HiveId(newGuidRedHerring);
            redHerringEntity.EntitySchema.Alias = "redherring-schema";

            using (var uow = providerSetup.UnitFactory.Create())
            {
                var publishedRevision = new Revision<TypedEntity>(entity)
                    { MetaData = { StatusType = FixedStatusTypes.Published } };

                uow.EntityRepository.Revisions.AddOrUpdate(publishedRevision);
                // Only add extra entity if caller wants it
                if (newGuidRedHerring != Guid.Empty) uow.EntityRepository.AddOrUpdate(redHerringEntity);
                uow.Complete();
            }

            return entity;
        }
开发者ID:paulsuart,项目名称:rebelcmsxu5,代码行数:32,代码来源:HiveModelCreationHelper.cs

示例4: ShortVersionOfLongHashComparesEqual

 public void ShortVersionOfLongHashComparesEqual()
 {
     var longRevision = new Revision("e0e50f0f23264cb59ab059fa049741f3e0e50f0f");
     var shortRevision = new Revision("e0e50f0f2326");
     Assert.That(longRevision, Is.EqualTo(shortRevision));
     Assert.That(shortRevision, Is.EqualTo(longRevision));
 }
开发者ID:davidsidlinger,项目名称:ccnet-hg-nosuck,代码行数:7,代码来源:RevisionFixture.cs

示例5: should_be_lesser_when_second_quality_is_a_real

        public void should_be_lesser_when_second_quality_is_a_real()
        {
            var first = new Revision();
            var second = new Revision(real: 1);

            first.Should().BeLessThan(second);
        }
开发者ID:Djohnnie,项目名称:Sonarr,代码行数:7,代码来源:RevisionComparableFixture.cs

示例6: should_be_greater_when_first_quality_is_a_real

        public void should_be_greater_when_first_quality_is_a_real()
        {
            var first = new Revision(real: 1);
            var second = new Revision();

            first.Should().BeGreaterThan(second);
        }
开发者ID:Djohnnie,项目名称:Sonarr,代码行数:7,代码来源:RevisionComparableFixture.cs

示例7: should_be_greater_when_first_is_a_proper_for_a_real

        public void should_be_greater_when_first_is_a_proper_for_a_real()
        {
            var first = new Revision(real: 1, version: 2);
            var second = new Revision(real: 1);

            first.Should().BeGreaterThan(second);
        }
开发者ID:Djohnnie,项目名称:Sonarr,代码行数:7,代码来源:RevisionComparableFixture.cs

示例8: CommitRevision

        public override void CommitRevision(Revision revision, string folder)
        {
            var filename = GetFileFromAlias(revision.Name, folder);

            if (File.Exists(filename))
                File.Delete(filename);

            if (File.Exists(filename))
                throw new Exception("An archive with the same name already exists.");

            using (var package = Package.Open(filename, FileMode.Create, FileAccess.ReadWrite, FileShare.None))
            {
                package.PackageProperties.Identifier = revision.Name;
                package.PackageProperties.Title = "Umbraco Courier 2.0 Package - " + revision.Name;
                package.PackageProperties.LastModifiedBy = "Umbraco Courier 2.0";
                package.PackageProperties.Creator = "Umbraco Courier 2.0";
                package.PackageProperties.Created = DateTime.Now;
                package.PackageProperties.Modified = DateTime.Now;
                package.PackageProperties.ContentType = "application/courierPackage";

                foreach (var item in revision.RevisionCollection)
                    AddPackagePart(package, item.Value.FilePath, item.Value.FileContent, "Revision");

                foreach (var item in revision.ResourceCollection)
                    AddPackagePart(package, item.Value.FilePath, item.Value.FileContent, "Resource");

                foreach (var item in revision.VirtualResourceCollection)
                    AddPackagePart(package, item.Value.FilePath, item.Value.FileContent, "VirtualResource");
            }
        }
开发者ID:jayvin,项目名称:Courier,代码行数:30,代码来源:PackagedNetworkShareProvider.cs

示例9: should_be_equal_when_both_real_and_version_match_for_real_proper

        public void should_be_equal_when_both_real_and_version_match_for_real_proper()
        {
            var first = new Revision(version: 2, real: 1);
            var second = new Revision(version: 2, real: 1);

            first.CompareTo(second).Should().Be(0);
        }
开发者ID:Djohnnie,项目名称:Sonarr,代码行数:7,代码来源:RevisionComparableFixture.cs

示例10: Post

        public object Post(RevisionDTO request)
        {
            var revision = new Revision
                {
                    Fecha = new DateTime().Date,
                    Hora = new DateTime(),
                    IdEquipo = request.Equipo,
                    //Usuario = request.Usuario,
                    Entidad = RpEntidad.Cargar((Int64) 2),
                    Tipo = Revision.TipoDocumento.TrasladoDeposito
                };

            foreach (var documento in request.Documentos)
            {
                revision.Documento.Add(new RevisionDocumento
                    {
                        Documento = documento,
                    });
            }

            foreach (var detalle  in request.Detalles)
            {
                revision.Detalle.Add(new RevisionDetalle
                    {
                        Articulo = RpArticulo.Cargar(detalle.Articulo.Codigo, revision.Entidad.Empresa.Codigo),
                        Bultos = detalle.Bultos,
                        Cantidad = detalle.Cantidad,
                        UnidadesBulto = detalle.UnidadesBulto,
                    });
            }

            RpRevision.Procesar(revision);

            return revision;
        }
开发者ID:rafareyes7,项目名称:UnifyWS,代码行数:35,代码来源:RevisionService.cs

示例11: GetChahngesetId

        public static int GetChahngesetId(Revision revision)
        {
            int prevLinksCount = revision.Index == 0
                ? 0
                : revision.WorkItem.Revisions[revision.Index - 1].Links.Count;
            if (prevLinksCount == revision.Links.Count)
                return 0;

            ExternalLink lastChangeset = null;
            for (int i = 0; i < revision.Links.Count; i++)
            {
                var link = revision.Links[i];
                if (link.BaseType == BaseLinkType.ExternalLink)
                {
                    var extLink = link as ExternalLink;
                    if (extLink.ArtifactLinkType.Name != "Fixed in Changeset")
                        continue;
                    lastChangeset = extLink;
                }
                if (lastChangeset != null && link.BaseType != BaseLinkType.ExternalLink)
                    break;
            }

            if (lastChangeset == null)
                return 0;

            string url = lastChangeset.LinkedArtifactUri;
            int lastInd = url.LastIndexOf('/');
            return int.Parse(url.Substring(lastInd + 1, url.Length - 1 - lastInd));
        }
开发者ID:starkmsu,项目名称:TfsRetrospectiveTool,代码行数:30,代码来源:RevisionParser.cs

示例12: ProjectStatisticsReporter

 /// <summary>
 /// Constructs reporter.
 /// </summary>
 public ProjectStatisticsReporter(Revision[] revisions, GroupingPeriod groupBy, DateTime fromDate, DateTime toDate)
 {
     m_revisions = revisions;
       m_groupBy = groupBy;
       m_fromDate = fromDate;
       m_toDate = toDate;
 }
开发者ID:ZoolooDan,项目名称:bug-db-analyzer,代码行数:10,代码来源:ProjectStatisticsReporter.cs

示例13: should_be_equal_when_both_real_and_version_match

        public void should_be_equal_when_both_real_and_version_match()
        {
            var first = new Revision();
            var second = new Revision();

            first.CompareTo(second).Should().Be(0);
        }
开发者ID:Djohnnie,项目名称:Sonarr,代码行数:7,代码来源:RevisionComparableFixture.cs

示例14: should_be_lesser_when_second_is_a_proper_for_a_real

        public void should_be_lesser_when_second_is_a_proper_for_a_real()
        {
            var first = new Revision(real: 1);
            var second = new Revision(real: 1, version: 2);

            first.Should().BeLessThan(second);
        }
开发者ID:Djohnnie,项目名称:Sonarr,代码行数:7,代码来源:RevisionComparableFixture.cs

示例15: GetChanges

 public ChangeSet GetChanges(Revision revision)
 {
     var changes = new ChangeSet();
     changes.Inserts = RetriveInserts(revision);
     changes.Updates = RetriveUpdates(revision);
     changes.Deletes = RetriveDeletes(revision);
     return changes;
 }
开发者ID:Antares007,项目名称:InRetail,代码行数:8,代码来源:Table.cs


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