/// <inheritdoc />
        public override string GetPathItemName(OpenApiConvertSettings settings)
        {
            Utils.CheckArgumentNull(settings, nameof(settings));

            IList <IEdmStructuralProperty> keys = EntityType.Key().ToList();

            if (keys.Count() == 1)
            {
                string keyName = keys.First().Name;

                if (settings.PrefixEntityTypeNameBeforeKey)
                {
                    return("{" + EntityType.Name + "-" + keyName + KeyIndex.ToString() + "}");
                }
                else
                {
                    return("{" + keyName + KeyIndex.ToString() + "}");
                }
            }
            else
            {
                IList <string> keyStrings = new List <string>();
                foreach (var keyProperty in keys)
                {
                    keyStrings.Add(keyProperty.Name + "={" + keyProperty.Name + KeyIndex.ToString() + "}");
                }

                return(String.Join(",", keyStrings));
            }
        }
예제 #2
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("InternalNode. KeyIndex: " + KeyIndex.ToString() + ". Keys: [");
            for (int i = 0; i <= KeyIndex; i++)
            {
                sb.Append(Keys[i]);
                if (i != KeyIndex)
                {
                    sb.Append(" ");
                }
            }
            sb.Append("]");
            return(sb.ToString());
        }
예제 #3
0
        public override string ToString()
        {
            string lockType = LockpickingChanceReduction == 0 ? "Open" : LockpickingChanceReduction >= 100 ? "No Lockpicking" : $"-{LockpickingChanceReduction}% Chance";

            return($"{Type}: Key={(KeyIndex == 0 ? "None" : KeyIndex.ToString())}, Lock=[{lockType}], Event index if unlock failed {UnlockFailedEventIndex:x4}, Text {(TextIndex == 0xff ? "none" : TextIndex.ToString())}, UnlockText {(UnlockTextIndex == 0xff ? "none" : UnlockTextIndex.ToString())}, Door Index {DoorIndex}");
        }
예제 #4
0
        public override string ToString()
        {
            string lockType = LockpickingChanceReduction == 0 ? "Open" : LockpickingChanceReduction >= 100 ? "No Lockpicking" : $"-{LockpickingChanceReduction}% Chance";

            return($"{Type}: Chest {ChestIndex}, Lock=[{lockType}], RemovedWhenEmpty={RemoveWhenEmpty}, Key={(KeyIndex == 0 ? "None" : KeyIndex.ToString())}, Event index if unlock failed {UnlockFailedEventIndex:x4}, Text {(TextIndex == 0xff ? "none" : TextIndex.ToString())}, Flags: {Flags}");
        }
예제 #5
0
 public override string ToString()
 {
     return($"{Type}: Chest {ChestIndex}, Lock=[{Lock}], RemovedWhenEmpty={RemoveWhenEmpty}, Key={(KeyIndex == 0 ? "None" : KeyIndex.ToString())}, Event index if unlock failed {UnlockFailedEventIndex:x4}, Unknown1 {Unknown1:x4}");
 }