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


C# Domain.ToString方法代码示例

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


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

示例1: GetFullFilePathByFileID

        public string GetFullFilePathByFileID(long FileID, Domain.File.Sizes FileSize)
        {
            string result = "";
            File file = _fileRepository.GetFileByID(FileID);

            if (file != null)
            {
                Folder folder = _folderRepository.GetFolderByID(file.DefaultFolderID);
                result = folder.CreateDate.Year.ToString() + folder.CreateDate.Month.ToString() + "/" +
                                file.FileSystemName + "__" + FileSize.ToString() + "." + file.Extension;
            }
            return result;
        }
开发者ID:ngocpq,项目名称:MHX2,代码行数:13,代码来源:FileService.cs

示例2: CompareTo

 public int CompareTo(Domain other)
 {
     return ToString().CompareTo(other.ToString());
 }
开发者ID:marinehero,项目名称:microserver,代码行数:4,代码来源:Message.cs

示例3: AuthenticateUser

 private void AuthenticateUser(Domain.User user, UserLogin userLogin)
 {
     SessionContext.CurrentUser = user;
     FormsAuthentication.SetAuthCookie(userLogin.UserName, false);
     var ticket = new FormsAuthenticationTicket(1, userLogin.UserName, DateTime.UtcNow, DateTime.UtcNow.AddMinutes(System.Web.HttpContext.Current.Session.Timeout),
         false, user.ToString(), FormsAuthentication.FormsCookiePath);
     var encryptedTicket = FormsAuthentication.Encrypt(ticket);
     var authCookie = new HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket) { HttpOnly = true };
     authCookie.Expires = ticket.Expiration;
     System.Web.HttpContext.Current.Response.Cookies.Add(authCookie);
     _sessionContext.SetUpSessionContext(HttpContext, SessionContext.CurrentUser);
     SetUserIdentity(SessionContext.LoggedOnUser);
 }
开发者ID:prescripds,项目名称:PreScripds.UI,代码行数:13,代码来源:AccountController.cs

示例4: SetVersion

        public override bool SetVersion(string databaseName, Domain.Values.Version version)
        {
            fileWriter.WriteLine(String.Format(CultureInfo.InvariantCulture, "--"));
            fileWriter.WriteLine(String.Format(CultureInfo.InvariantCulture, "-- Set database version - {0}", version.ToString()));
            fileWriter.WriteLine(String.Format(CultureInfo.InvariantCulture, "--"));

            return true;
        }
开发者ID:binarymash,项目名称:DatabaseScripter,代码行数:8,代码来源:Adapter.cs

示例5: Matches

        private static bool Matches(Domain domain, Domain entry)
        {
            string[] labels = entry.ToString().Split('.');
            string[] patterns = new string[labels.Length];

            for (int i = 0; i < labels.Length; i++) {
                string label = labels[i];
                patterns[i] = label == "*" ? "(\\w+)" : Regex.Escape(label);
            }

            Regex re = new Regex("^" + string.Join("\\.", patterns) + "$");
            return re.IsMatch(domain.ToString());
        }
开发者ID:ICDNS,项目名称:dns-1,代码行数:13,代码来源:MasterFile.cs

示例6: Test


//.........这里部分代码省略.........
            procs
              Insert
            , Update
            , SelectMany
            , Select (Id)
            , Select (Code)
            , Select (Name)
            , DeleteMany
            , Activate
            , Deactivate
            , GetIds
            tasks
              Add
            , Edit
            , Delete
            , Activate
            , Deactivate
            , MoveUp
            , MoveDown

            entity WorkoutType
              Id short auto
            , ProgrammeId Programme
            , Code string(4, 10) unique
            , Name string(4, 50) unique
            , Multiple bool
            , SortOrder short
            indexes
              unique (ProgrammeId Code)
            , unique (ProgrammeId Name)
            procs
              SelectMany
            , SelectMany (ProgrammeId)
            , Insert
            , Update
            , DeleteMany

            entity WorkoutDate
              Id int auto
            , ProgrammeId Programme
            , TrainerId Account null
            , AccountId Account null
            , Date date
            , Duration short
            , Detail string(2000)
            procs
              Select (Id)
            , Select (ProgrammeId Date)
            , Insert
            , Update
            , DeleteMany
            , GetIds
            tasks
              Add
            , Delete
            , EditResult 'Edit Result' one
            , Copy 'Copy' one

            entity Workout
              Id int auto
            , WorkoutDateId WorkoutDate
            , WorkoutTypeId WorkoutType
            , Detail string(1000)
            indexes
              unique (WorkoutDateId WorkoutTypeId)

            entity Result
              Id int auto
            , WorkoutDateId WorkoutDate
            , AccountId Account
            , Detail string(1000)
            indexes
              unique (WorkoutDateId AccountId)
            procs
              Insert
            , Update
            , DeleteMany
            , Select (Id)
            , Select (WorkoutDateId AccountId)

            entity AccountProgramme
              Id int auto
            , AccountId Account
            , ProgrammeId Programme
            procs
              Insert
            , DeleteMany
            , SelectMany (AccountId)
            , SelectMany (ProgrammeId)";

            var node = parser.Parse(domainDef);

            var nodeString = NodeToString(node);

            var domain = new Domain(node);

            var actual = domain.ToString();

            Assert.That(actual, Is.EqualTo(domainDef));
        }
开发者ID:danthomas,项目名称:Parsing,代码行数:101,代码来源:ParserTests.cs


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