Changeset 3970 for branches/HeuristicLab.Services.Authentication Prototype
- Timestamp:
- 06/28/10 18:28:12 (14 years ago)
- Location:
- branches/HeuristicLab.Services.Authentication Prototype
- Files:
-
- 3 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.dbml
r3968 r3970 1 1 <?xml version="1.0" encoding="utf-8"?> 2 <Database Class="DataClassesDataContext" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007">2 <Database Class="DataClassesDataContext" Serialization="Unidirectional" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007"> 3 3 <Table Name="" Member="HeuristicLabUsers"> 4 4 <Type Name="HeuristicLabUser"> … … 11 11 <Column Name="Email" Modifier="Virtual" Type="System.String" CanBeNull="false" /> 12 12 <Column Name="Comment" Modifier="Virtual" Type="System.String" CanBeNull="false" /> 13 <Column Member="Locked" Type="System.Boolean" CanBeNull="false" />13 <Column Name="Locked" Type="System.Boolean" CanBeNull="false" /> 14 14 <Association Name="HeuristicLabUser_HeuristicLabUserRole" Member="HeuristicLabUserRoles" Storage="_HeuristicLabUserRole" ThisKey="ID" OtherKey="HeuristicLabUserID" Type="HeuristicLabUserRole" /> 15 15 </Type> -
branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.dbml.layout
r3968 r3970 21 21 </nestedChildShapes> 22 22 </classShape> 23 <associationConnector edgePoints="[(1.5625 : 3.1651025390625); (1.5625 : 3.625)]" fixedFrom=" Algorithm" fixedTo="Algorithm">23 <associationConnector edgePoints="[(1.5625 : 3.1651025390625); (1.5625 : 3.625)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 24 24 <AssociationMoniker Name="/DataClassesDataContext/HeuristicLabUser/HeuristicLabUser_HeuristicLabUserRole" /> 25 25 <nodes> -
branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.designer.cs
r3968 r3970 19 19 using System.Linq; 20 20 using System.Linq.Expressions; 21 using System.Runtime.Serialization; 21 22 using System.ComponentModel; 22 23 using System; … … 91 92 92 93 [Table(Name="")] 94 [DataContract()] 93 95 public partial class HeuristicLabUser : INotifyPropertyChanging, INotifyPropertyChanged 94 96 { … … 115 117 116 118 private EntitySet<HeuristicLabUserRole> _HeuristicLabUserRole; 119 120 private bool serializing; 117 121 118 122 #region Extensibility Method Definitions … … 120 124 partial void OnValidate(System.Data.Linq.ChangeAction action); 121 125 partial void OnCreated(); 126 partial void OnIDChanging(long value); 127 partial void OnIDChanged(); 128 partial void OnUserNameChanging(string value); 129 partial void OnUserNameChanged(); 122 130 partial void OnPasswordChanging(string value); 123 131 partial void OnPasswordChanged(); 132 partial void OnLastPasswordChangedDateChanging(System.DateTime value); 133 partial void OnLastPasswordChangedDateChanged(); 134 partial void OnPasswordQuestionChanging(string value); 135 partial void OnPasswordQuestionChanged(); 124 136 partial void OnPasswordAnswerChanging(string value); 125 137 partial void OnPasswordAnswerChanged(); … … 134 146 public HeuristicLabUser() 135 147 { 136 this._HeuristicLabUserRole = new EntitySet<HeuristicLabUserRole>(new Action<HeuristicLabUserRole>(this.attach_HeuristicLabUserRole), new Action<HeuristicLabUserRole>(this.detach_HeuristicLabUserRole)); 137 OnCreated(); 148 this.Initialize(); 138 149 } 139 150 140 151 [Column(Name="id", Storage="_id", AutoSync=AutoSync.OnInsert, IsPrimaryKey=true, IsDbGenerated=true, UpdateCheck=UpdateCheck.Never)] 152 [DataMember(Order=1)] 141 153 public long ID 142 154 { … … 145 157 return this._id; 146 158 } 159 set 160 { 161 if ((this._id != value)) 162 { 163 this.OnIDChanging(value); 164 this.SendPropertyChanging(); 165 this._id = value; 166 this.SendPropertyChanged("ID"); 167 this.OnIDChanged(); 168 } 169 } 147 170 } 148 171 149 172 [Column(Storage="_UserName", CanBeNull=false, UpdateCheck=UpdateCheck.Never)] 173 [DataMember(Order=2)] 150 174 public virtual string UserName 151 175 { … … 154 178 return this._UserName; 155 179 } 180 set 181 { 182 if ((this._UserName != value)) 183 { 184 this.OnUserNameChanging(value); 185 this.SendPropertyChanging(); 186 this._UserName = value; 187 this.SendPropertyChanged("UserName"); 188 this.OnUserNameChanged(); 189 } 190 } 156 191 } 157 192 158 193 [Column(Storage="_Password", CanBeNull=false)] 194 [DataMember(Order=3)] 159 195 public string Password 160 196 { … … 177 213 178 214 [Column(Storage="_LastPasswordChangedDate", UpdateCheck=UpdateCheck.Never)] 215 [DataMember(Order=4)] 179 216 public virtual System.DateTime LastPasswordChangedDate 180 217 { … … 183 220 return this._LastPasswordChangedDate; 184 221 } 222 set 223 { 224 if ((this._LastPasswordChangedDate != value)) 225 { 226 this.OnLastPasswordChangedDateChanging(value); 227 this.SendPropertyChanging(); 228 this._LastPasswordChangedDate = value; 229 this.SendPropertyChanged("LastPasswordChangedDate"); 230 this.OnLastPasswordChangedDateChanged(); 231 } 232 } 185 233 } 186 234 187 235 [Column(Storage="_PasswordQuestion", CanBeNull=false, UpdateCheck=UpdateCheck.Never)] 236 [DataMember(Order=5)] 188 237 public virtual string PasswordQuestion 189 238 { … … 192 241 return this._PasswordQuestion; 193 242 } 243 set 244 { 245 if ((this._PasswordQuestion != value)) 246 { 247 this.OnPasswordQuestionChanging(value); 248 this.SendPropertyChanging(); 249 this._PasswordQuestion = value; 250 this.SendPropertyChanged("PasswordQuestion"); 251 this.OnPasswordQuestionChanged(); 252 } 253 } 194 254 } 195 255 196 256 [Column(Storage="_PasswordAnswer", CanBeNull=false)] 257 [DataMember(Order=6)] 197 258 public string PasswordAnswer 198 259 { … … 215 276 216 277 [Column(Storage="_Email", CanBeNull=false)] 278 [DataMember(Order=7)] 217 279 public virtual string Email 218 280 { … … 235 297 236 298 [Column(Storage="_Comment", CanBeNull=false)] 299 [DataMember(Order=8)] 237 300 public virtual string Comment 238 301 { … … 255 318 256 319 [Column(Storage="_Locked")] 320 [DataMember(Order=9)] 257 321 public bool Locked 258 322 { … … 275 339 276 340 [Association(Name="HeuristicLabUser_HeuristicLabUserRole", Storage="_HeuristicLabUserRole", ThisKey="ID", OtherKey="HeuristicLabUserID")] 341 [DataMember(Order=10, EmitDefaultValue=false)] 277 342 public EntitySet<HeuristicLabUserRole> HeuristicLabUserRoles 278 343 { 279 344 get 280 345 { 346 if ((this.serializing 347 && (this._HeuristicLabUserRole.HasLoadedOrAssignedValues == false))) 348 { 349 return null; 350 } 281 351 return this._HeuristicLabUserRole; 282 352 } … … 317 387 this.SendPropertyChanging(); 318 388 entity.HeuristicLabUser = null; 389 } 390 391 private void Initialize() 392 { 393 this._HeuristicLabUserRole = new EntitySet<HeuristicLabUserRole>(new Action<HeuristicLabUserRole>(this.attach_HeuristicLabUserRole), new Action<HeuristicLabUserRole>(this.detach_HeuristicLabUserRole)); 394 OnCreated(); 395 } 396 397 [OnDeserializing()] 398 [System.ComponentModel.EditorBrowsableAttribute(EditorBrowsableState.Never)] 399 public void OnDeserializing(StreamingContext context) 400 { 401 this.Initialize(); 402 } 403 404 [OnSerializing()] 405 [System.ComponentModel.EditorBrowsableAttribute(EditorBrowsableState.Never)] 406 public void OnSerializing(StreamingContext context) 407 { 408 this.serializing = true; 409 } 410 411 [OnSerialized()] 412 [System.ComponentModel.EditorBrowsableAttribute(EditorBrowsableState.Never)] 413 public void OnSerialized(StreamingContext context) 414 { 415 this.serializing = false; 319 416 } 320 417 } 321 418 322 419 [Table(Name="")] 420 [DataContract()] 323 421 public partial class HeuristicLabRole : INotifyPropertyChanging, INotifyPropertyChanged 324 422 { … … 339 437 340 438 private EntityRef<HeuristicLabRole> _HeuristicLabRole1; 439 440 private bool serializing; 341 441 342 442 #region Extensibility Method Definitions … … 344 444 partial void OnValidate(System.Data.Linq.ChangeAction action); 345 445 partial void OnCreated(); 446 partial void OnIDChanging(long value); 447 partial void OnIDChanged(); 346 448 partial void OnRoleNameChanging(string value); 347 449 partial void OnRoleNameChanged(); … … 354 456 public HeuristicLabRole() 355 457 { 458 this.Initialize(); 459 } 460 461 [Column(Storage="_ID", AutoSync=AutoSync.OnInsert, IsPrimaryKey=true, IsDbGenerated=true, UpdateCheck=UpdateCheck.Never)] 462 [DataMember(Order=1)] 463 public long ID 464 { 465 get 466 { 467 return this._ID; 468 } 469 set 470 { 471 if ((this._ID != value)) 472 { 473 this.OnIDChanging(value); 474 this.SendPropertyChanging(); 475 this._ID = value; 476 this.SendPropertyChanged("ID"); 477 this.OnIDChanged(); 478 } 479 } 480 } 481 482 [Column(Name="roleName", Storage="_roleName", CanBeNull=false)] 483 [DataMember(Order=2)] 484 public string RoleName 485 { 486 get 487 { 488 return this._roleName; 489 } 490 set 491 { 492 if ((this._roleName != value)) 493 { 494 this.OnRoleNameChanging(value); 495 this.SendPropertyChanging(); 496 this._roleName = value; 497 this.SendPropertyChanged("RoleName"); 498 this.OnRoleNameChanged(); 499 } 500 } 501 } 502 503 [Column(Name="parentRoleID", Storage="_parentRoleID")] 504 [DataMember(Order=3)] 505 public System.Nullable<long> ParentRoleID 506 { 507 get 508 { 509 return this._parentRoleID; 510 } 511 set 512 { 513 if ((this._parentRoleID != value)) 514 { 515 this.OnParentRoleIDChanging(value); 516 this.SendPropertyChanging(); 517 this._parentRoleID = value; 518 this.SendPropertyChanged("ParentRoleID"); 519 this.OnParentRoleIDChanged(); 520 } 521 } 522 } 523 524 [Column(Storage="_IsPermission")] 525 [DataMember(Order=4)] 526 public bool IsPermission 527 { 528 get 529 { 530 return this._IsPermission; 531 } 532 set 533 { 534 if ((this._IsPermission != value)) 535 { 536 this.OnIsPermissionChanging(value); 537 this.SendPropertyChanging(); 538 this._IsPermission = value; 539 this.SendPropertyChanged("IsPermission"); 540 this.OnIsPermissionChanged(); 541 } 542 } 543 } 544 545 [Association(Name="HeuristicLabRole_HeuristicLabRole", Storage="_HeuristicLabRole2", ThisKey="ID", OtherKey="ParentRoleID")] 546 [DataMember(Order=5, EmitDefaultValue=false)] 547 public EntitySet<HeuristicLabRole> HeuristicLabRoleChilds 548 { 549 get 550 { 551 if ((this.serializing 552 && (this._HeuristicLabRole2.HasLoadedOrAssignedValues == false))) 553 { 554 return null; 555 } 556 return this._HeuristicLabRole2; 557 } 558 set 559 { 560 this._HeuristicLabRole2.Assign(value); 561 } 562 } 563 564 [Association(Name="HeuristicLabRole_HeuristicLabUserRole", Storage="_HeuristicLabUserRole", ThisKey="ID", OtherKey="HeuristicLabRoleID")] 565 [DataMember(Order=6, EmitDefaultValue=false)] 566 public EntitySet<HeuristicLabUserRole> HeuristicLabUserRoles 567 { 568 get 569 { 570 if ((this.serializing 571 && (this._HeuristicLabUserRole.HasLoadedOrAssignedValues == false))) 572 { 573 return null; 574 } 575 return this._HeuristicLabUserRole; 576 } 577 set 578 { 579 this._HeuristicLabUserRole.Assign(value); 580 } 581 } 582 583 [Association(Name="HeuristicLabRole_HeuristicLabRole", Storage="_HeuristicLabRole1", ThisKey="ParentRoleID", OtherKey="ID", IsForeignKey=true)] 584 public HeuristicLabRole HeuristicLabRoleParent 585 { 586 get 587 { 588 return this._HeuristicLabRole1.Entity; 589 } 590 set 591 { 592 HeuristicLabRole previousValue = this._HeuristicLabRole1.Entity; 593 if (((previousValue != value) 594 || (this._HeuristicLabRole1.HasLoadedOrAssignedValue == false))) 595 { 596 this.SendPropertyChanging(); 597 if ((previousValue != null)) 598 { 599 this._HeuristicLabRole1.Entity = null; 600 previousValue.HeuristicLabRoleChilds.Remove(this); 601 } 602 this._HeuristicLabRole1.Entity = value; 603 if ((value != null)) 604 { 605 value.HeuristicLabRoleChilds.Add(this); 606 this._parentRoleID = value.ID; 607 } 608 else 609 { 610 this._parentRoleID = default(Nullable<long>); 611 } 612 this.SendPropertyChanged("HeuristicLabRoleParent"); 613 } 614 } 615 } 616 617 public event PropertyChangingEventHandler PropertyChanging; 618 619 public event PropertyChangedEventHandler PropertyChanged; 620 621 protected virtual void SendPropertyChanging() 622 { 623 if ((this.PropertyChanging != null)) 624 { 625 this.PropertyChanging(this, emptyChangingEventArgs); 626 } 627 } 628 629 protected virtual void SendPropertyChanged(String propertyName) 630 { 631 if ((this.PropertyChanged != null)) 632 { 633 this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); 634 } 635 } 636 637 private void attach_HeuristicLabRole2(HeuristicLabRole entity) 638 { 639 this.SendPropertyChanging(); 640 entity.HeuristicLabRoleParent = this; 641 } 642 643 private void detach_HeuristicLabRole2(HeuristicLabRole entity) 644 { 645 this.SendPropertyChanging(); 646 entity.HeuristicLabRoleParent = null; 647 } 648 649 private void attach_HeuristicLabUserRole(HeuristicLabUserRole entity) 650 { 651 this.SendPropertyChanging(); 652 entity.HeuristicLabRole = this; 653 } 654 655 private void detach_HeuristicLabUserRole(HeuristicLabUserRole entity) 656 { 657 this.SendPropertyChanging(); 658 entity.HeuristicLabRole = null; 659 } 660 661 private void Initialize() 662 { 356 663 this._HeuristicLabRole2 = new EntitySet<HeuristicLabRole>(new Action<HeuristicLabRole>(this.attach_HeuristicLabRole2), new Action<HeuristicLabRole>(this.detach_HeuristicLabRole2)); 357 664 this._HeuristicLabUserRole = new EntitySet<HeuristicLabUserRole>(new Action<HeuristicLabUserRole>(this.attach_HeuristicLabUserRole), new Action<HeuristicLabUserRole>(this.detach_HeuristicLabUserRole)); … … 360 667 } 361 668 362 [Column(Storage="_ID", AutoSync=AutoSync.OnInsert, IsPrimaryKey=true, IsDbGenerated=true, UpdateCheck=UpdateCheck.Never)] 363 public long ID 364 { 365 get 366 { 367 return this._ID; 368 } 369 } 370 371 [Column(Name="roleName", Storage="_roleName", CanBeNull=false)] 372 public string RoleName 373 { 374 get 375 { 376 return this._roleName; 377 } 378 set 379 { 380 if ((this._roleName != value)) 381 { 382 this.OnRoleNameChanging(value); 383 this.SendPropertyChanging(); 384 this._roleName = value; 385 this.SendPropertyChanged("RoleName"); 386 this.OnRoleNameChanged(); 387 } 388 } 389 } 390 391 [Column(Name="parentRoleID", Storage="_parentRoleID")] 392 public System.Nullable<long> ParentRoleID 393 { 394 get 395 { 396 return this._parentRoleID; 397 } 398 set 399 { 400 if ((this._parentRoleID != value)) 401 { 402 this.OnParentRoleIDChanging(value); 403 this.SendPropertyChanging(); 404 this._parentRoleID = value; 405 this.SendPropertyChanged("ParentRoleID"); 406 this.OnParentRoleIDChanged(); 407 } 408 } 409 } 410 411 [Column(Storage="_IsPermission")] 412 public bool IsPermission 413 { 414 get 415 { 416 return this._IsPermission; 417 } 418 set 419 { 420 if ((this._IsPermission != value)) 421 { 422 this.OnIsPermissionChanging(value); 423 this.SendPropertyChanging(); 424 this._IsPermission = value; 425 this.SendPropertyChanged("IsPermission"); 426 this.OnIsPermissionChanged(); 427 } 428 } 429 } 430 431 [Association(Name="HeuristicLabRole_HeuristicLabRole", Storage="_HeuristicLabRole2", ThisKey="ID", OtherKey="ParentRoleID")] 432 public EntitySet<HeuristicLabRole> HeuristicLabRoleChilds 433 { 434 get 435 { 436 return this._HeuristicLabRole2; 437 } 438 set 439 { 440 this._HeuristicLabRole2.Assign(value); 441 } 442 } 443 444 [Association(Name="HeuristicLabRole_HeuristicLabUserRole", Storage="_HeuristicLabUserRole", ThisKey="ID", OtherKey="HeuristicLabRoleID")] 445 public EntitySet<HeuristicLabUserRole> HeuristicLabUserRoles 446 { 447 get 448 { 449 return this._HeuristicLabUserRole; 450 } 451 set 452 { 453 this._HeuristicLabUserRole.Assign(value); 454 } 455 } 456 457 [Association(Name="HeuristicLabRole_HeuristicLabRole", Storage="_HeuristicLabRole1", ThisKey="ParentRoleID", OtherKey="ID", IsForeignKey=true)] 458 public HeuristicLabRole HeuristicLabRoleParent 459 { 460 get 461 { 462 return this._HeuristicLabRole1.Entity; 463 } 464 set 465 { 466 HeuristicLabRole previousValue = this._HeuristicLabRole1.Entity; 467 if (((previousValue != value) 468 || (this._HeuristicLabRole1.HasLoadedOrAssignedValue == false))) 469 { 470 this.SendPropertyChanging(); 471 if ((previousValue != null)) 472 { 473 this._HeuristicLabRole1.Entity = null; 474 previousValue.HeuristicLabRoleChilds.Remove(this); 475 } 476 this._HeuristicLabRole1.Entity = value; 477 if ((value != null)) 478 { 479 value.HeuristicLabRoleChilds.Add(this); 480 this._parentRoleID = value.ID; 481 } 482 else 483 { 484 this._parentRoleID = default(Nullable<long>); 485 } 486 this.SendPropertyChanged("HeuristicLabRoleParent"); 487 } 488 } 489 } 490 491 public event PropertyChangingEventHandler PropertyChanging; 492 493 public event PropertyChangedEventHandler PropertyChanged; 494 495 protected virtual void SendPropertyChanging() 496 { 497 if ((this.PropertyChanging != null)) 498 { 499 this.PropertyChanging(this, emptyChangingEventArgs); 500 } 501 } 502 503 protected virtual void SendPropertyChanged(String propertyName) 504 { 505 if ((this.PropertyChanged != null)) 506 { 507 this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); 508 } 509 } 510 511 private void attach_HeuristicLabRole2(HeuristicLabRole entity) 512 { 513 this.SendPropertyChanging(); 514 entity.HeuristicLabRoleParent = this; 515 } 516 517 private void detach_HeuristicLabRole2(HeuristicLabRole entity) 518 { 519 this.SendPropertyChanging(); 520 entity.HeuristicLabRoleParent = null; 521 } 522 523 private void attach_HeuristicLabUserRole(HeuristicLabUserRole entity) 524 { 525 this.SendPropertyChanging(); 526 entity.HeuristicLabRole = this; 527 } 528 529 private void detach_HeuristicLabUserRole(HeuristicLabUserRole entity) 530 { 531 this.SendPropertyChanging(); 532 entity.HeuristicLabRole = null; 669 [OnDeserializing()] 670 [System.ComponentModel.EditorBrowsableAttribute(EditorBrowsableState.Never)] 671 public void OnDeserializing(StreamingContext context) 672 { 673 this.Initialize(); 674 } 675 676 [OnSerializing()] 677 [System.ComponentModel.EditorBrowsableAttribute(EditorBrowsableState.Never)] 678 public void OnSerializing(StreamingContext context) 679 { 680 this.serializing = true; 681 } 682 683 [OnSerialized()] 684 [System.ComponentModel.EditorBrowsableAttribute(EditorBrowsableState.Never)] 685 public void OnSerialized(StreamingContext context) 686 { 687 this.serializing = false; 533 688 } 534 689 } 535 690 536 691 [Table(Name="")] 692 [DataContract()] 537 693 public partial class HeuristicLabUserRole : INotifyPropertyChanging, INotifyPropertyChanged 538 694 { … … 564 720 public HeuristicLabUserRole() 565 721 { 722 this.Initialize(); 723 } 724 725 [Column(Storage="_ID", AutoSync=AutoSync.OnInsert, IsPrimaryKey=true, IsDbGenerated=true)] 726 [DataMember(Order=1)] 727 public long ID 728 { 729 get 730 { 731 return this._ID; 732 } 733 set 734 { 735 if ((this._ID != value)) 736 { 737 this.OnIDChanging(value); 738 this.SendPropertyChanging(); 739 this._ID = value; 740 this.SendPropertyChanged("ID"); 741 this.OnIDChanged(); 742 } 743 } 744 } 745 746 [Column(Storage="_HeuristicLabUserID")] 747 [DataMember(Order=2)] 748 public long HeuristicLabUserID 749 { 750 get 751 { 752 return this._HeuristicLabUserID; 753 } 754 set 755 { 756 if ((this._HeuristicLabUserID != value)) 757 { 758 if (this._HeuristicLabUser.HasLoadedOrAssignedValue) 759 { 760 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); 761 } 762 this.OnHeuristicLabUserIDChanging(value); 763 this.SendPropertyChanging(); 764 this._HeuristicLabUserID = value; 765 this.SendPropertyChanged("HeuristicLabUserID"); 766 this.OnHeuristicLabUserIDChanged(); 767 } 768 } 769 } 770 771 [Column(Storage="_HeuristicLabRoleID")] 772 [DataMember(Order=3)] 773 public long HeuristicLabRoleID 774 { 775 get 776 { 777 return this._HeuristicLabRoleID; 778 } 779 set 780 { 781 if ((this._HeuristicLabRoleID != value)) 782 { 783 if (this._HeuristicLabAbstractRole.HasLoadedOrAssignedValue) 784 { 785 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); 786 } 787 this.OnHeuristicLabRoleIDChanging(value); 788 this.SendPropertyChanging(); 789 this._HeuristicLabRoleID = value; 790 this.SendPropertyChanged("HeuristicLabRoleID"); 791 this.OnHeuristicLabRoleIDChanged(); 792 } 793 } 794 } 795 796 [Association(Name="HeuristicLabUser_HeuristicLabUserRole", Storage="_HeuristicLabUser", ThisKey="HeuristicLabUserID", OtherKey="ID", IsForeignKey=true)] 797 public HeuristicLabUser HeuristicLabUser 798 { 799 get 800 { 801 return this._HeuristicLabUser.Entity; 802 } 803 set 804 { 805 HeuristicLabUser previousValue = this._HeuristicLabUser.Entity; 806 if (((previousValue != value) 807 || (this._HeuristicLabUser.HasLoadedOrAssignedValue == false))) 808 { 809 this.SendPropertyChanging(); 810 if ((previousValue != null)) 811 { 812 this._HeuristicLabUser.Entity = null; 813 previousValue.HeuristicLabUserRoles.Remove(this); 814 } 815 this._HeuristicLabUser.Entity = value; 816 if ((value != null)) 817 { 818 value.HeuristicLabUserRoles.Add(this); 819 this._HeuristicLabUserID = value.ID; 820 } 821 else 822 { 823 this._HeuristicLabUserID = default(long); 824 } 825 this.SendPropertyChanged("HeuristicLabUser"); 826 } 827 } 828 } 829 830 [Association(Name="HeuristicLabRole_HeuristicLabUserRole", Storage="_HeuristicLabAbstractRole", ThisKey="HeuristicLabRoleID", OtherKey="ID", IsForeignKey=true)] 831 public HeuristicLabRole HeuristicLabRole 832 { 833 get 834 { 835 return this._HeuristicLabAbstractRole.Entity; 836 } 837 set 838 { 839 HeuristicLabRole previousValue = this._HeuristicLabAbstractRole.Entity; 840 if (((previousValue != value) 841 || (this._HeuristicLabAbstractRole.HasLoadedOrAssignedValue == false))) 842 { 843 this.SendPropertyChanging(); 844 if ((previousValue != null)) 845 { 846 this._HeuristicLabAbstractRole.Entity = null; 847 previousValue.HeuristicLabUserRoles.Remove(this); 848 } 849 this._HeuristicLabAbstractRole.Entity = value; 850 if ((value != null)) 851 { 852 value.HeuristicLabUserRoles.Add(this); 853 this._HeuristicLabRoleID = value.ID; 854 } 855 else 856 { 857 this._HeuristicLabRoleID = default(long); 858 } 859 this.SendPropertyChanged("HeuristicLabRole"); 860 } 861 } 862 } 863 864 public event PropertyChangingEventHandler PropertyChanging; 865 866 public event PropertyChangedEventHandler PropertyChanged; 867 868 protected virtual void SendPropertyChanging() 869 { 870 if ((this.PropertyChanging != null)) 871 { 872 this.PropertyChanging(this, emptyChangingEventArgs); 873 } 874 } 875 876 protected virtual void SendPropertyChanged(String propertyName) 877 { 878 if ((this.PropertyChanged != null)) 879 { 880 this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); 881 } 882 } 883 884 private void Initialize() 885 { 566 886 this._HeuristicLabUser = default(EntityRef<HeuristicLabUser>); 567 887 this._HeuristicLabAbstractRole = default(EntityRef<HeuristicLabRole>); … … 569 889 } 570 890 571 [Column(Storage="_ID", AutoSync=AutoSync.OnInsert, IsPrimaryKey=true, IsDbGenerated=true)] 572 public long ID 573 { 574 get 575 { 576 return this._ID; 577 } 578 set 579 { 580 if ((this._ID != value)) 581 { 582 this.OnIDChanging(value); 583 this.SendPropertyChanging(); 584 this._ID = value; 585 this.SendPropertyChanged("ID"); 586 this.OnIDChanged(); 587 } 588 } 589 } 590 591 [Column(Storage="_HeuristicLabUserID")] 592 public long HeuristicLabUserID 593 { 594 get 595 { 596 return this._HeuristicLabUserID; 597 } 598 set 599 { 600 if ((this._HeuristicLabUserID != value)) 601 { 602 if (this._HeuristicLabUser.HasLoadedOrAssignedValue) 603 { 604 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); 605 } 606 this.OnHeuristicLabUserIDChanging(value); 607 this.SendPropertyChanging(); 608 this._HeuristicLabUserID = value; 609 this.SendPropertyChanged("HeuristicLabUserID"); 610 this.OnHeuristicLabUserIDChanged(); 611 } 612 } 613 } 614 615 [Column(Storage="_HeuristicLabRoleID")] 616 public long HeuristicLabRoleID 617 { 618 get 619 { 620 return this._HeuristicLabRoleID; 621 } 622 set 623 { 624 if ((this._HeuristicLabRoleID != value)) 625 { 626 if (this._HeuristicLabAbstractRole.HasLoadedOrAssignedValue) 627 { 628 throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); 629 } 630 this.OnHeuristicLabRoleIDChanging(value); 631 this.SendPropertyChanging(); 632 this._HeuristicLabRoleID = value; 633 this.SendPropertyChanged("HeuristicLabRoleID"); 634 this.OnHeuristicLabRoleIDChanged(); 635 } 636 } 637 } 638 639 [Association(Name="HeuristicLabUser_HeuristicLabUserRole", Storage="_HeuristicLabUser", ThisKey="HeuristicLabUserID", OtherKey="ID", IsForeignKey=true)] 640 public HeuristicLabUser HeuristicLabUser 641 { 642 get 643 { 644 return this._HeuristicLabUser.Entity; 645 } 646 set 647 { 648 HeuristicLabUser previousValue = this._HeuristicLabUser.Entity; 649 if (((previousValue != value) 650 || (this._HeuristicLabUser.HasLoadedOrAssignedValue == false))) 651 { 652 this.SendPropertyChanging(); 653 if ((previousValue != null)) 654 { 655 this._HeuristicLabUser.Entity = null; 656 previousValue.HeuristicLabUserRoles.Remove(this); 657 } 658 this._HeuristicLabUser.Entity = value; 659 if ((value != null)) 660 { 661 value.HeuristicLabUserRoles.Add(this); 662 this._HeuristicLabUserID = value.ID; 663 } 664 else 665 { 666 this._HeuristicLabUserID = default(long); 667 } 668 this.SendPropertyChanged("HeuristicLabUser"); 669 } 670 } 671 } 672 673 [Association(Name="HeuristicLabRole_HeuristicLabUserRole", Storage="_HeuristicLabAbstractRole", ThisKey="HeuristicLabRoleID", OtherKey="ID", IsForeignKey=true)] 674 public HeuristicLabRole HeuristicLabRole 675 { 676 get 677 { 678 return this._HeuristicLabAbstractRole.Entity; 679 } 680 set 681 { 682 HeuristicLabRole previousValue = this._HeuristicLabAbstractRole.Entity; 683 if (((previousValue != value) 684 || (this._HeuristicLabAbstractRole.HasLoadedOrAssignedValue == false))) 685 { 686 this.SendPropertyChanging(); 687 if ((previousValue != null)) 688 { 689 this._HeuristicLabAbstractRole.Entity = null; 690 previousValue.HeuristicLabUserRoles.Remove(this); 691 } 692 this._HeuristicLabAbstractRole.Entity = value; 693 if ((value != null)) 694 { 695 value.HeuristicLabUserRoles.Add(this); 696 this._HeuristicLabRoleID = value.ID; 697 } 698 else 699 { 700 this._HeuristicLabRoleID = default(long); 701 } 702 this.SendPropertyChanged("HeuristicLabRole"); 703 } 704 } 705 } 706 707 public event PropertyChangingEventHandler PropertyChanging; 708 709 public event PropertyChangedEventHandler PropertyChanged; 710 711 protected virtual void SendPropertyChanging() 712 { 713 if ((this.PropertyChanging != null)) 714 { 715 this.PropertyChanging(this, emptyChangingEventArgs); 716 } 717 } 718 719 protected virtual void SendPropertyChanged(String propertyName) 720 { 721 if ((this.PropertyChanged != null)) 722 { 723 this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); 724 } 891 [OnDeserializing()] 892 [System.ComponentModel.EditorBrowsableAttribute(EditorBrowsableState.Never)] 893 public void OnDeserializing(StreamingContext context) 894 { 895 this.Initialize(); 725 896 } 726 897 } -
branches/HeuristicLab.Services.Authentication Prototype/Persistence/DatabaseUtil.cs
r3955 r3970 1 1 using System; 2 using System.Diagnostics; 2 3 3 4 namespace Persistence { … … 6 7 /// </summary> 7 8 public class DatabaseUtil { 9 10 protected static bool productionDatabase = true; 11 12 public static bool ProductionDatabase { 13 get { 14 return DatabaseUtil.productionDatabase; 15 } 16 set { 17 DatabaseUtil.productionDatabase = value; 18 } 19 } 20 8 21 /// <summary> 9 22 /// creates and returns a database connection, if possible … … 11 24 /// <returns>database connection (could be null)</returns> 12 25 public static DataClassesDataContext createDataClassesDataContext() { 13 return new Persistence.DataClassesDataContext(@"C:\TEMP\HeuristicLabTest.mdf"); 26 if (productionDatabase) { 27 return new Persistence.DataClassesDataContext(new Persistence.Properties.Settings().DatabaseConnectionString); 28 } else { 29 return new Persistence.DataClassesDataContext(new Persistence.Properties.Settings().DatabaseConnectionStringTesting); 30 } 14 31 } 15 32 … … 19 36 /// <param name="db">DataClassesDataContext</param> 20 37 public static void createDatabase(DataClassesDataContext db) { 21 if (db == null) { 22 throw new ArgumentNullException("db"); 23 } 24 38 25 39 if (db.DatabaseExists()) { 26 40 Console.WriteLine("Deleting old database..."); -
branches/HeuristicLab.Services.Authentication Prototype/Persistence/Persistence.csproj
r3955 r3970 39 39 <RequiredTargetFramework>3.5</RequiredTargetFramework> 40 40 </Reference> 41 <Reference Include="System.Runtime.Serialization"> 42 <RequiredTargetFramework>3.0</RequiredTargetFramework> 43 </Reference> 41 44 <Reference Include="System.Web" /> 42 45 <Reference Include="System.Xml.Linq"> … … 59 62 <Compile Include="HeuristicLabUser.cs" /> 60 63 <Compile Include="Properties\AssemblyInfo.cs" /> 64 <Compile Include="Properties\Settings.Designer.cs"> 65 <AutoGen>True</AutoGen> 66 <DesignTimeSharedInput>True</DesignTimeSharedInput> 67 <DependentUpon>Settings.settings</DependentUpon> 68 </Compile> 61 69 </ItemGroup> 62 70 <ItemGroup> … … 71 79 </ItemGroup> 72 80 <ItemGroup> 81 <None Include="app.config" /> 73 82 <None Include="DataClasses.dbml.layout"> 74 83 <DependentUpon>DataClasses.dbml</DependentUpon> 84 </None> 85 <None Include="Properties\Settings.settings"> 86 <Generator>SettingsSingleFileGenerator</Generator> 87 <LastGenOutput>Settings.Designer.cs</LastGenOutput> 75 88 </None> 76 89 </ItemGroup> -
branches/HeuristicLab.Services.Authentication Prototype/Service/App.config
r3932 r3970 4 4 <compilation debug="true" /> 5 5 </system.web> 6 <!-- Bei der Bereitstellung des Dienstbibliothekprojekts muss der Inhalt der Konfigurationsdatei der app.config-Datei7 des Hosts hinzugefügt werden. System.Configuration unterstützt keine Konfigurationsdateien für Bibliotheken. -->8 6 <system.serviceModel> 9 <services> 10 <service name="Service.Service1" behaviorConfiguration="Service.Service1Behavior"> 11 <host> 12 <baseAddresses> 13 <add baseAddress = "http://localhost:8731/Design_Time_Addresses/Service/Service1/" /> 14 </baseAddresses> 15 </host> 16 <!-- Service Endpoints --> 17 <!-- Wenn die Adresse nicht vollqualifiziert ist, ist sie relativ zur oben angegebenen Basisadresse. --> 18 <endpoint address ="" binding="wsHttpBinding" contract="Service.IService1"> 19 <!-- 20 Bei der Bereitstellung muss das folgende Identitätselement entfernt oder ersetzt werden, um die Identität 21 wiederzugeben, unter der der bereitgestellte Dienst ausgeführt wird. Wenn es entfernt wird, leitet WCF eine geeignete Identität 22 automatisch ab. 23 --> 24 <identity> 25 <dns value="localhost"/> 26 </identity> 27 </endpoint> 28 <!-- Metadata Endpoints --> 29 <!-- Der Metadatenaustausch-Endpunkt wird von dem Dienst verwendet, um sich gegenüber Clients selbst zu beschreiben. --> 30 <!-- Dieser Endpunkt verwendet keine sichere Bindung und muss vor der Bereitstellung gesichert oder entfernt werden. --> 31 <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> 32 </service> 33 </services> 34 <behaviors> 35 <serviceBehaviors> 36 <behavior name="Service.Service1Behavior"> 37 <!-- Legen Sie den Wert unten auf "false" fest, um die Veröffentlichung 38 von Metadateninformationen zu vermeiden, und entfernen Sie den Metadatenendpunkt oben vor der Bereitstellung. --> 39 <serviceMetadata httpGetEnabled="True"/> 40 <!-- Damit in Fehlern Ausnahmedetails zum Debuggen angezeigt werden, 41 legen Sie den Wert unten auf "true" fest. Legen Sie ihn vor der Bereitstellung auf "false" fest, 42 um die Veröffentlichung von Ausnahmeinformationen zu vermeiden. --> 43 <serviceDebug includeExceptionDetailInFaults="False" /> 44 </behavior> 45 </serviceBehaviors> 46 </behaviors> 47 </system.serviceModel> 7 </system.serviceModel> 48 8 </configuration> -
branches/HeuristicLab.Services.Authentication Prototype/Service/Service.csproj
r3943 r3970 54 54 </ItemGroup> 55 55 <ItemGroup> 56 <Compile Include="IService1.cs" />57 56 <Compile Include="Properties\AssemblyInfo.cs" /> 58 57 <Compile Include="Provider\HeuristicLabMembershipProvider.cs" /> 59 58 <Compile Include="Provider\HeuristicLabRoleProvider.cs" /> 60 <Compile Include="Service1.cs" /> 59 <Compile Include="Services\Administration\AuthorizationManagementService.cs" /> 60 <Compile Include="Services\Administration\IAuthorizationManagementService.cs" /> 61 61 </ItemGroup> 62 62 <ItemGroup> … … 79 79 <ProjectExtensions> 80 80 <VisualStudio> 81 <FlavorProperties GUID="{3D9AD99F-2412-4246-B90B-4EAA41C64699}">82 <WcfProjectProperties>83 <AutoStart>True</AutoStart>84 </WcfProjectProperties>85 </FlavorProperties>86 81 </VisualStudio> 87 82 </ProjectExtensions> -
branches/HeuristicLab.Services.Authentication Prototype/Service/Service.csproj.user
r3943 r3970 2 2 <ProjectExtensions> 3 3 <VisualStudio> 4 <FlavorProperties GUID="{3D9AD99F-2412-4246-B90B-4EAA41C64699}" xmlns="">5 <WcfProjectProperties>6 <PublishCopyOption>RunFiles</PublishCopyOption>7 <PublishTargetLocation>8 </PublishTargetLocation>9 <PublishDeleteAllFiles>False</PublishDeleteAllFiles>10 </WcfProjectProperties>11 </FlavorProperties>12 4 </VisualStudio> 13 5 </ProjectExtensions> -
branches/HeuristicLab.Services.Authentication Prototype/UnitTests/AbstractHeuristicLabTest.cs
r3949 r3970 18 18 /// </summary> 19 19 public AbstractHeuristicLabTest() { 20 Persistence.DatabaseUtil.ProductionDatabase = false; 20 21 db = Persistence.DatabaseUtil.createDataClassesDataContext(); 21 22 }
Note: See TracChangeset
for help on using the changeset viewer.