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


C# Guid.ToList方法代码示例

本文整理汇总了C#中System.Guid.ToList方法的典型用法代码示例。如果您正苦于以下问题:C# Guid.ToList方法的具体用法?C# Guid.ToList怎么用?C# Guid.ToList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Guid的用法示例。


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

示例1: ActiveExtensions

 public ActiveExtensions(Guid DriverGuid, Guid GrabberGuid, Guid[] ProcessorGuids,
                         Guid[] FilterGuids, Guid[] NotifierGuids)
 {
     this._ActiveProcessors = new List<GlowScreenProcessor>();
     this._ActiveFilters = new List<GlowFilter>();
     this._ActiveNotifiers = new List<GlowNotifier>();
     this.DriverGuid = DriverGuid;
     this.GrabberGuid = GrabberGuid;
     this.ProcessorGuids = ProcessorGuids.ToList();
     this.FilterGuids = FilterGuids.ToList();
     this.NotifierGuids = NotifierGuids.ToList();
 }
开发者ID:abigail3306,项目名称:wintumbra,代码行数:12,代码来源:ActiveExtensions.cs

示例2: Post

 public ActionResult Post(Guid roleId, Guid[] ids)
 {
     try
     {
         _roleFunctionService.Update(roleId, ids.ToList());
         return Json(true);
     }
     catch (Exception e)
     {
         _logger.Error(e.Message);
         _logger.Error(e.StackTrace);
         return Json(false);
     }
 }
开发者ID:ideayapai,项目名称:docviewer,代码行数:14,代码来源:AuthController.cs

示例3: GetByIds

 public LeadDto[] GetByIds(Guid[] ids)
 {
     try
     {
         using (var transactionScope = new TransactionScope())
         {
             var employeeDtos = new LeadDtoMapper().Map(_leadRepository.GetByIds(ids.ToList()).ToArray());
             transactionScope.Complete();
             return employeeDtos;
         }
     }
     finally
     {
         _sessionProvider.CloseCurrent();
     }
 }
开发者ID:lucidcoding,项目名称:EnterpriseExample,代码行数:16,代码来源:LeadService.svc.cs

示例4: GetByIds

 public AppointmentDto[] GetByIds(Guid[] ids)
 {
     try
     {
         using (var transactionScope = new TransactionScope())
         {
             var appointmentDtos = new AppointmentDtoMapper().Map(_appointmentRepository.GetByIds(ids.ToList()).ToArray());
             transactionScope.Complete();
             return appointmentDtos;
         }
     }
     finally
     {
         _sessionProvider.CloseCurrent();
     }
 }
开发者ID:lucidcoding,项目名称:EnterpriseExample,代码行数:16,代码来源:AppointmentService.svc.cs

示例5: AddSelectedEmployees

        public PartialViewResult AddSelectedEmployees(long riskAssessmentId, Guid[] employeeIds)
        {
            var request = new AddEmployeesToChecklistGeneratorRequest()
                              {
                                  CompanyId = CurrentUser.CompanyId,
                                  CurrentUserId = CurrentUser.UserId,
                                  EmployeeIds = employeeIds.ToList(),
                                  PersonalRiskAssessmentId = riskAssessmentId
                              };
           
            _personalRiskAssessmentService.AddEmployeesToChecklistGenerator(request);

            var model = _selectedEmployeeViewModelFactory.WithCompanyId(CurrentUser.CompanyId).WithRiskAssessmentId(riskAssessmentId).WithUserId(CurrentUser.UserId)
                .GetViewModel();

            return PartialView("_EmployeeSelected", model);

        }
开发者ID:mnasif786,项目名称:Business-Safe,代码行数:18,代码来源:ChecklistGeneratorController.cs

示例6: GetDependingEntityAccess

        public static List<Tuple<Guid, string, List<Tuple<Guid, string>>>> GetDependingEntityAccess(string metaviewName, Guid[] ids, int deep = 1)
        {
            DynamicEntityRepository repo = new DynamicEntityRepository();
            EntityMetadata metadata = repo.GetEntityMetadataByEntityName(metaviewName);
            List<Guid> dependingEntityMetadataIds = MetadataRepositoty.GetDependingEntityIds(new TableDescription(metadata.SchemaName, metadata.TableName));
            Dictionary<Guid, EntityMetadata> dependingMetadata = dependingEntityMetadataIds.Select(id => new KeyValuePair<Guid, EntityMetadata>(id, repo.GetEntityMetadataByEntityId(id)))
                .ToDictionary(kvp => kvp.Key, kvp => kvp.Value);

            var dependingEntities = new List<Tuple<Guid, string, List<Tuple<Guid, string>>>>();

            foreach (var entityMetadata in dependingMetadata)
            {
                FilterCriteriaSet filters = FilterCriteriaSet.Empty;
                AttributeDescription entityCaptionAttribute = OptimaJet.BJet.CommonMethods.GetEntityCaptionAttribute(entityMetadata.Value);

                List<FilterCriteriaSet> filterSets = entityMetadata.Value.PlainAttributes.Where(a => a.IsReference && a.ReferencedSchemaName == metadata.SchemaName && a.ReferencedTableName == metadata.TableName)
                    .Select(a => FilterCriteriaSet.And.In(ids.ToList(), entityMetadata.Value.GetColumn(a))).ToList();

                filterSets.ForEach(f => filters = filters != FilterCriteriaSet.Empty ? filters.Merge(f) : f);

                var entities = repo.GetEntitiesByMetadata(entityMetadata.Value, filters).Entities;
                if (entities == null || entities.Count() == 0)
                    continue;

                var dependingEntity = new Tuple<Guid, string, List<Tuple<Guid, string>>>(
                    entityMetadata.Key,
                    entityMetadata.Value.TableName,
                    new List<Tuple<Guid, string>>(entities.Select(e =>
                        new Tuple<Guid, string>((Guid)e.Id, e.GetProperty(entityCaptionAttribute.PropertyName).ToString())
                        ).ToList()));
                dependingEntities.Add(dependingEntity);

                if (deep > 0)
                    dependingEntities.AddRange(GetDependingEntityAccess(dependingEntity.Item2, dependingEntity.Item3.Select(t => t.Item1).ToArray(), deep - 1));
            }
            return dependingEntities;
        }
开发者ID:dmelnikov,项目名称:DWKit,代码行数:37,代码来源:EntityAccess.cs

示例7: OnDeleteRows

        protected override void OnDeleteRows(Guid[] checkedRecords)
        {
            string entityName =  LocalizationProvider.Provider.GetMetaEntiryName();

            var objs = DynamicRepository.GetByEntity(entityName, FilterCriteriaSet.And.In(checkedRecords.ToList(), "Id"));

            List<string> keys = new List<string>();
            foreach(var obj in objs)
            {
                if(!keys.Contains(obj.Key))
                    keys.Add(obj.Key);
            }

            DynamicRepository.DeleteByEntity(entityName,
                DynamicRepository.GetByEntity(entityName, FilterCriteriaSet.And.In(keys, "Key")).Select(c=> c.Id).ToList());
        }
开发者ID:dmelnikov,项目名称:DWKit,代码行数:16,代码来源:LocalizationController.cs

示例8: EmployeePhotosRemove

        /// <summary>
        /// Remove photo to employee
        /// </summary>
        /// <param name="employeeId">Employee identifier</param>
        /// <param name="photoIdentifier">Employee photo identifier</param>
        public Model.EmployeePhotoExecutionResults EmployeePhotosRemove(long employeeId, Guid[] photoIdentifiers)
        {
            UpdateSessionCulture();
            using (var logSession = Helpers.Log.Session($"{GetType()}.{System.Reflection.MethodBase.GetCurrentMethod().Name}()", VerboseLog, RaiseLog))
                try
                {
                    var emp = EmployeeGet(employeeId);
                    if (emp.Exception != null)
                        throw emp.Exception;

                    using (var rep = GetNewRepository(logSession))
                    {
                        photoIdentifiers.ToList().ForEach(photoIdentifier => {
                            var dbPhoto = rep.Get<Repository.Model.EmployeePhoto>(e => e.FileId == photoIdentifier).SingleOrDefault();
                            if (dbPhoto == null)
                                throw new Exception(string.Format(Properties.Resources.FILESERVICE_FileNotFound, photoIdentifier));
                            rep.Remove(dbPhoto, saveAfterRemove: false);
                        });
                        rep.SaveChanges(true);
                    }

                    return EmployeePhotosGet(employeeId);
                }
                catch (Exception ex)
                {
                    ex.Data.Add(nameof(employeeId), employeeId);
                    ex.Data.Add(nameof(photoIdentifiers), photoIdentifiers.Concat(i => i.ToString(),", "));
                    logSession.Enabled = true;
                    logSession.Add(ex);
                    return new EmployeePhotoExecutionResults(ex);
                }
        }
开发者ID:kblc,项目名称:Personnel,代码行数:37,代码来源:StuffingService.EmployeePhoto.cs

示例9: ExceptionsDeleteList

        public ActionResult ExceptionsDeleteList(string log, Guid[] ids, bool returnCounts = false)
        {
            if (ids == null || ids.Length == 0) return Json(true);
            ExceptionStores.Action(log, s => s.DeleteErrors(log, ids.ToList()));

            return returnCounts ? ExceptionCounts() : Json(new { url = Url.Action("Exceptions", new { log }) });
        }
开发者ID:Janiels,项目名称:Opserver,代码行数:7,代码来源:ExceptionsController.cs


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